This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: An error of gcc-ss-20030303
- From: <tm_gccmail at mail dot kloo dot net>
- To: Jie Zhang <zhangjie at magima dot com dot cn>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 23 Apr 2003 15:19:58 -0700 (PDT)
- Subject: Re: An error of gcc-ss-20030303
On Wed, 23 Apr 2003, Jie Zhang wrote:
> The following code is copied from spinlock.c in uClibc (after
> preprocessing and 'inline' after static removed):
>
> static void __pthread_release(int * spinlock)
> {
> asm ("" : : : "memory");
> *spinlock = 0;
> __asm __volatile ("" : "=m" (*spinlock) : "0" (*spinlock));
> }
>
Why not use a pointer to a volatile int?
Toshi