PAPI 7.1.0.0
Loading...
Searching...
No Matches
msftc/x86.h File Reference
Include dependency graph for msftc/x86.h:

Go to the source code of this file.

Macros

#define AO_T_IS_INT
 
#define AO_USE_INTERLOCKED_INTRINSICS
 
#define AO_HAVE_char_fetch_and_add_full
 
#define AO_HAVE_short_fetch_and_add_full
 
#define AO_HAVE_test_and_set_full
 

Functions

AO_INLINE unsigned char AO_char_fetch_and_add_full (volatile unsigned char *p, unsigned char incr)
 
AO_INLINE unsigned short AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
 
AO_INLINE AO_TS_VAL_t AO_test_and_set_full (volatile AO_TS_t *addr)
 

Macro Definition Documentation

◆ AO_HAVE_char_fetch_and_add_full

#define AO_HAVE_char_fetch_and_add_full

Definition at line 87 of file msftc/x86.h.

◆ AO_HAVE_short_fetch_and_add_full

#define AO_HAVE_short_fetch_and_add_full

Definition at line 100 of file msftc/x86.h.

◆ AO_HAVE_test_and_set_full

#define AO_HAVE_test_and_set_full

Definition at line 117 of file msftc/x86.h.

◆ AO_T_IS_INT

#define AO_T_IS_INT

Definition at line 43 of file msftc/x86.h.

◆ AO_USE_INTERLOCKED_INTRINSICS

#define AO_USE_INTERLOCKED_INTRINSICS

Definition at line 47 of file msftc/x86.h.

Function Documentation

◆ AO_char_fetch_and_add_full()

AO_INLINE unsigned char AO_char_fetch_and_add_full ( volatile unsigned char *  p,
unsigned char  incr 
)

Definition at line 77 of file msftc/x86.h.

78 {
79 __asm
80 {
81 mov al, incr
82 mov ebx, p
83 lock xadd byte ptr [ebx], al
84 }
85 /* Ignore possible "missing return value" warning here. */
86 }
atomic_p lock[]
Definition: aix.c:25

◆ AO_short_fetch_and_add_full()

AO_INLINE unsigned short AO_short_fetch_and_add_full ( volatile unsigned short *  p,
unsigned short  incr 
)

Definition at line 90 of file msftc/x86.h.

91 {
92 __asm
93 {
94 mov ax, incr
95 mov ebx, p
96 lock xadd word ptr [ebx], ax
97 }
98 /* Ignore possible "missing return value" warning here. */
99 }

◆ AO_test_and_set_full()

AO_INLINE AO_TS_VAL_t AO_test_and_set_full ( volatile AO_TS_t addr)

Definition at line 107 of file msftc/x86.h.

108 {
109 __asm
110 {
111 mov eax,0xff ; /* AO_TS_SET */
112 mov ebx,addr ;
113 xchg byte ptr [ebx],al ;
114 }
115 /* Ignore possible "missing return value" warning here. */
116 }