Changeset 3448 for trunk/src/kash/shthread.h
- Timestamp:
- Sep 13, 2020, 1:15:59 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/shthread.h
r3446 r3448 58 58 void shmtx_leave(shmtx *pmtx, shmtxtmp *ptmp); 59 59 60 61 K_INLINE unsigned sh_atomic_inc(KU32 volatile *valuep) 62 { 63 #ifdef _MSC_VER 64 return _InterlockedIncrement((long *)valuep); 65 #else 66 return __sync_fetch_and_add(valuep, 1); 67 #endif 68 } 69 70 K_INLINE unsigned sh_atomic_dec(unsigned volatile *valuep) 71 { 72 #ifdef _MSC_VER 73 return _InterlockedDecrement((long *)valuep); 74 #else 75 return __sync_fetch_and_sub(valuep, 1); 76 #endif 77 } 78 60 79 #endif 61 80
Note:
See TracChangeset
for help on using the changeset viewer.