[ug-bosug] How to use CAS Instruction (or) atomic Function in C
programs.
Pramod Batni
pramod.batni at gmail.com
Sun Mar 12 20:44:46 PST 2006
The atomic operations are available as Standard C Library functions
[atomic_add_16, atmoic_add_32..] which are declared in atomic.h .
For more details on the atomic operations please refer to 'man -s 3C atomic_ops'
Pramod
On 3/13/06, Rama Krishna <ramaakrishnaa at gmail.com> wrote:
> Hi,
> For nonblocking implementation of stacks and queues we actually required the use of CAS (Compare and Swap instruction)instruction in the C program.From google search and wikipedia http://publib16.boulder.ibm.com/pseries/en_US/libs/ktechrf1/compare_and_swap.htm) i came to know that it a atomic function and is available in #include<sys/atomic_op.h>
header. When i used this header file in the C program and try to
compile it is showing no such header file is there. Actually we want
to know which libraries to include to use CAS instruction. Can any one
who know how to use CAS instruction in solaris 10 (using gcc compiler)
,please inform us.
>
> Rama
> --
> This message posted from opensolaris.org
> _______________________________________________
> ug-bosug mailing list
> List-Unsubscribe: mailto:ug-bosug-unsubscribe at opensolaris.org
> List-Owner: mailto:ug-bosug-owner at opensolaris.org
> List-Archives: http://www.opensolaris.org/jive/forum.jspa?forumID=54
>
_______________________________________________
ug-bosug mailing list
List-Unsubscribe: mailto:ug-bosug-unsubscribe at opensolaris.org
List-Owner: mailto:ug-bosug-owner at opensolaris.org
List-Archives: http://www.opensolaris.org/jive/forum.jspa?forumIDT
More information about the ug-discuss
mailing list