This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: __sync_lock_test_and_set on ARM
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: "Phil Endecott" <spam_from_gcc_help_2 at chezphil dot org>
- Cc: "Andrew Haley" <aph-gcc at littlepinkcloud dot COM>, <gcc-help at gcc dot gnu dot org>
- Date: Thu, 13 Sep 2007 04:08:36 +0200
- Subject: Re: __sync_lock_test_and_set on ARM
- References: <18152.9913.255951.758383@zebedee.pink> <1189620841825@dmwebmail.japan.chezphil.org>
As an aside...
#define __KERNEL__
#include <asm/atomic.h>
You don't want to do this, the stuff in the header files bracketed
with __KERNEL__ is for internal use in the Linux kernel only; with
newer kernel versions, that stuff isn't copied into the user headers
anymore even.
You can of course copy that code into your own code, or perhaps
glibc has similar functionality somewhere?
Segher