19#ifndef _STLP_LOCK_FREE_SLIST_H
20#define _STLP_LOCK_FREE_SLIST_H
22#if defined(_STLP_PTHREADS)
25# if defined (__GNUC__) && defined (__i386__)
27# define _STLP_HAS_ATOMIC_FREELIST
34class _STLP_atomic_freelist {
43 _STLP_atomic_freelist() {
46 _M._M_data._M_top = 0;
47 _M._M_data._M_sequence = 0;
70 (
" movl %%ebx, %%edi\n\t"
71 " movl %%ecx, %%ebx\n\t"
72 "L1_%=: movl %%eax, (%%ebx)\n\t"
73 " leal 1(%%edx),%%ecx\n\t"
74 "lock; cmpxchg8b (%%esi)\n\t"
77 :
"=a" (__tmp1),
"=d" (__tmp2),
"=c" (__tmp3)
78 :
"a" (_M._M_data._M_top),
"d" (_M._M_data._M_sequence),
"c" (__item),
"S" (&_M._M_data)
79 :
"edi",
"memory",
"cc");
92 (
" movl %%ebx, %%edi\n\t"
93 "L1_%=: testl %%eax, %%eax\n\t"
95 " movl (%%eax), %%ebx\n\t"
96 " leal 1(%%edx),%%ecx\n\t"
97 "lock; cmpxchg8b (%%esi)\n\t"
99 "L2_%=: movl %%edi, %%ebx"
100 :
"=a" (__result),
"=d" (__tmp)
101 :
"a" (_M._M_data._M_top),
"d" (_M._M_data._M_sequence),
"S" (&_M._M_data)
102 :
"edi",
"ecx",
"memory",
"cc");
117 (
" movl %%ebx, %%edi\n\t"
118 "L1_%=: testl %%eax, %%eax\n\t"
120 " xorl %%ebx, %%ebx\n\t"
121 " leal 1(%%edx),%%ecx\n\t"
122 "lock; cmpxchg8b (%%esi)\n\t"
124 "L2_%=: movl %%edi, %%ebx"
125 :
"=a" (__result),
"=d" (__tmp)
126 :
"a" (_M._M_data._M_top),
"d" (_M._M_data._M_sequence),
"S" (&_M._M_data)
127 :
"edi",
"ecx",
"memory",
"cc");
136 unsigned int _M_sequence;
140 _STLP_atomic_freelist(
const _STLP_atomic_freelist&);
141 _STLP_atomic_freelist& operator=(
const _STLP_atomic_freelist&);
146#elif defined (_STLP_WIN32THREADS)
148# if !defined (_WIN64)
149# define _STLP_USE_ASM_IMPLEMENTATION
154# if defined (_STLP_USE_ASM_IMPLEMENTATION)
156# if defined (_STLP_MSVC) && defined (_M_IX86) && (_M_IX86 >= 500)
157# define _STLP_HAS_ATOMIC_FREELIST
161# if defined (_STLP_NEW_PLATFORM_SDK) && (!defined (WINVER) || (WINVER >= 0x0501)) && \
162 (!defined (_WIN32_WINNT) || (_WIN32_WINNT >= 0x0501))
163# define _STLP_HAS_ATOMIC_FREELIST
167# if defined (_STLP_HAS_ATOMIC_FREELIST)
168# if defined (_STLP_USE_ASM_IMPLEMENTATION)
169# if defined (_STLP_MSVC) && (_STLP_MSVC < 1300) || defined (__ICL)
170# pragma warning (push)
171# pragma warning (disable : 4035)
180class _STLP_atomic_freelist {
185# if defined (_STLP_USE_ASM_IMPLEMENTATION)
193 _STLP_atomic_freelist() {
195# if defined (_STLP_USE_ASM_IMPLEMENTATION)
197 _M._M_data._M_top = 0;
198 _M._M_data._M_sequence = 0;
210# if defined (_STLP_USE_ASM_IMPLEMENTATION)
234# if defined (_STLP_USE_ASM_IMPLEMENTATION)
261# if defined (_STLP_USE_ASM_IMPLEMENTATION)
281# if defined (_STLP_USE_ASM_IMPLEMENTATION)
286 unsigned int _M_sequence;
293 _STLP_atomic_freelist(
const _STLP_atomic_freelist&);
294 _STLP_atomic_freelist& operator = (
const _STLP_atomic_freelist&);
297# if defined (_STLP_USE_ASM_IMPLEMENTATION)
298# if defined (_STLP_MSVC) && (_STLP_MSVC < 1300) || defined (__ICL)
299# pragma warning (pop)
static void xor(unsigned char *dst, const unsigned char *a, const unsigned char *b, const int count)
#define _STLP_STATIC_ASSERT(expr)
__asm__(".p2align 4, 0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tsub %rbp, %rax\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tsub $32, %rsp\n" "\t.seh_stackalloc 32\n" "\t.seh_endprologue\n" "\tsub %rax, %rdx\n" "\tmov %rdx, %rbp\n" "\tjmp *%r8\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd $32, %rsp\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc")
static calc_node_t * pop(void)
static void push(calc_node_t *op)
ecx edi movl ebx edx edi decl ecx esi eax jecxz decl eax andl ebx
ecx edi movl ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl eax
ecx edi movl ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl edx movl TEMP incl eax andl eax ecx incl ebx testl eax jnz xchgl ecx incl TEMP esi
ecx edi movl ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl edx
#define SLIST_ENTRY(type)
#define InterlockedPushEntrySList(SListHead, SListEntry)
#define InterlockedFlushSList(SListHead)
#define InterlockedPopEntrySList(SListHead)
FORCEINLINE VOID InitializeSListHead(_Out_ PSLIST_HEADER SListHead)