Home | History | Annotate | Download | only in upstream-dlmalloc

Lines Matching refs:sl

1828 #define CAS_LOCK(sl)     __sync_lock_test_and_set(sl, 1)
1829 #define CLEAR_LOCK(sl) __sync_lock_release(sl)
1833 static FORCEINLINE int x86_cas_lock(int *sl) {
1839 : "r" (val), "m" (*(sl)), "0"(cmp)
1844 static FORCEINLINE void x86_clear_lock(int* sl) {
1845 assert(*sl != 0);
1850 : "m" (*(sl)), "0"(prev)
1854 #define CAS_LOCK(sl) x86_cas_lock(sl)
1855 #define CLEAR_LOCK(sl) x86_clear_lock(sl)
1858 #define CAS_LOCK(sl) interlockedexchange(sl, (LONG)1)
1859 #define CLEAR_LOCK(sl) interlockedexchange (sl, (LONG)0)
1878 static int spin_acquire_lock(int *sl) {
1880 while (*(volatile int *)sl != 0 || CAS_LOCK(sl)) {
1889 #define TRY_LOCK(sl) !CAS_LOCK(sl)
1890 #define RELEASE_LOCK(sl) CLEAR_LOCK(sl)
1891 #define ACQUIRE_LOCK(sl) (CAS_LOCK(sl)? spin_acquire_lock(sl) : 0)
1892 #define INITIAL_LOCK(sl) (*sl = 0)
1893 #define DESTROY_LOCK(sl) (0)
1914 int sl;
1923 assert(lk->sl != 0);
1925 CLEAR_LOCK(&lk->sl);
1933 if (*((volatile int *)(&lk->sl)) == 0) {
1934 if (!CAS_LOCK(&lk->sl)) {
1952 if (*((volatile int *)(&lk->sl)) == 0) {
1953 if (!CAS_LOCK(&lk->sl)) {
1969 #define INITIAL_LOCK(lk) ((lk)->threadid = (THREAD_ID_T)0, (lk)->sl = 0, (lk)->c = 0)