From patchwork Tue Sep 17 11:43:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Caban X-Patchwork-Id: 275440 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6CC402C00DE for ; Tue, 17 Sep 2013 21:42:30 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=M6sJofS5b5cVS0eOR xamw4F3+buKXUn1prS5Byq5yYeH/dK87jqDdnF+M5BD8wJQkZl8pn56iVQAKJwwF kgDs5b77WMV9nWfcO6evOs9pM0ZBiH/rJVLXze6R+U+1+/qfw3vZWtHBwoNWp5qU i1oweGrZlMyHVsN4YAm5nyBYyo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=6J8qjXBJAWOh6E6a5tD8Gw7 YDUc=; b=HtUX7qHyH8bqChRcbp1P4Sf61+iRrAYn5OU1P2s0bpErjIqvhA2zKV7 9bvbMe6gVXVL6VenXVpa4J70HPVusr0d2E5NhIUGj6PcTmO9mGA0QBu1TexVadL+ bhD3zjEinxqT6I1wq6Sv1kH7Uqy6CABb7NjHEKWXsqfdWnNxDYPU= Received: (qmail 29407 invoked by alias); 17 Sep 2013 11:42:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 29395 invoked by uid 89); 17 Sep 2013 11:42:23 -0000 Received: from mail-we0-f179.google.com (HELO mail-we0-f179.google.com) (74.125.82.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 17 Sep 2013 11:42:23 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED, AWL, BAYES_00, FREEMAIL_FROM, KHOP_THREADED autolearn=ham version=3.3.2 X-HELO: mail-we0-f179.google.com Received: by mail-we0-f179.google.com with SMTP id x55so4846959wes.24 for ; Tue, 17 Sep 2013 04:42:11 -0700 (PDT) X-Received: by 10.194.193.4 with SMTP id hk4mr26639065wjc.29.1379418131230; Tue, 17 Sep 2013 04:42:11 -0700 (PDT) Received: from [10.7.236.137] (vpn.psi.wroc.pl. [193.239.56.39]) by mx.google.com with ESMTPSA id l9sm3809407wif.10.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Sep 2013 04:42:10 -0700 (PDT) Message-ID: <52384078.2060505@gmail.com> Date: Tue, 17 Sep 2013 13:43:52 +0200 From: Jacek Caban User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130818 Thunderbird/17.0.8 MIME-Version: 1.0 To: Kai Tietz CC: gcc-patches Subject: Re: Use CreateSemaphoreW instead of CreateSemaphoreA in libgcc. References: <52383ABB.5010404@gmail.com> In-Reply-To: X-IsSubscribed: yes On 09/17/13 13:41, Kai Tietz wrote: > 2013/9/17 Jacek Caban : >> This is no-op for usual GCC targets, because we don't pass any string to >> CreateSemaphore anyway. However this trivial change will help >> mingw-w64's efforts to support WinRT, where only unicode variant is >> available. >> >> libgcc/Changelog: >> config/i386/gthr-win32.c: CreateSemaphoreW instead of CreateSemaphoreA. >> config/i386/gthr-win32.h: Likewise. >> > Please attach (or inline) patch. It's attached now, sorry. Jacek commit eea3738e6103da1d1bc391b99734c93737d292a4 Author: Jacek Caban Date: Tue May 7 17:22:01 2013 +0200 Use CreateSemaphoreW instead of CreateSemaphoreA in libgcc. libgcc/Changelog: config/i386/gthr-win32.c: CreateSemaphoreW instead of CreateSemaphoreA. config/i386/gthr-win32.h: Likewise. diff --git a/libgcc/config/i386/gthr-win32.c b/libgcc/config/i386/gthr-win32.c index f6f661a..f323031 100644 --- a/libgcc/config/i386/gthr-win32.c +++ b/libgcc/config/i386/gthr-win32.c @@ -147,7 +147,7 @@ void __gthr_win32_mutex_init_function (__gthread_mutex_t *mutex) { mutex->counter = -1; - mutex->sema = CreateSemaphore (NULL, 0, 65535, NULL); + mutex->sema = CreateSemaphoreW (NULL, 0, 65535, NULL); } void @@ -195,7 +195,7 @@ __gthr_win32_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex) mutex->counter = -1; mutex->depth = 0; mutex->owner = 0; - mutex->sema = CreateSemaphore (NULL, 0, 65535, NULL); + mutex->sema = CreateSemaphoreW (NULL, 0, 65535, NULL); } int diff --git a/libgcc/config/i386/gthr-win32.h b/libgcc/config/i386/gthr-win32.h index d2e729a..1e437fc 100644 --- a/libgcc/config/i386/gthr-win32.h +++ b/libgcc/config/i386/gthr-win32.h @@ -635,7 +635,7 @@ static inline void __gthread_mutex_init_function (__gthread_mutex_t *__mutex) { __mutex->counter = -1; - __mutex->sema = CreateSemaphore (NULL, 0, 65535, NULL); + __mutex->sema = CreateSemaphoreW (NULL, 0, 65535, NULL); } static inline void @@ -697,7 +697,7 @@ __gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex) __mutex->counter = -1; __mutex->depth = 0; __mutex->owner = 0; - __mutex->sema = CreateSemaphore (NULL, 0, 65535, NULL); + __mutex->sema = CreateSemaphoreW (NULL, 0, 65535, NULL); } static inline int