/ohos5.0/drivers/hdf_core/adapter/khdf/liteos/osal/src/ |
H A D | osal_spinlock.c | 42 if (spinlock == NULL) { in OsalSpinInit() 55 spinlock->realSpinlock = spin; in OsalSpinInit() 62 if (spinlock == NULL || spinlock->realSpinlock == NULL) { in OsalSpinDestroy() 75 if (spinlock == NULL || spinlock->realSpinlock == NULL) { in OsalSpinLock() 87 if (spinlock == NULL || spinlock->realSpinlock == NULL) { in OsalSpinUnlock() 100 if (spinlock == NULL || spinlock->realSpinlock == NULL) { in OsalSpinLockIrq() 108 (void)spinlock; in OsalSpinLockIrq() 117 if (spinlock == NULL || spinlock->realSpinlock == NULL) { in OsalSpinUnlockIrq() 125 (void)spinlock; in OsalSpinUnlockIrq() 135 if (spinlock == NULL || spinlock->realSpinlock == NULL || flags == NULL) { in OsalSpinLockIrqSave() [all …]
|
/ohos5.0/drivers/hdf_core/adapter/khdf/linux/osal/src/ |
H A D | osal_spinlock.c | 31 if (spinlock == NULL) { in OsalSpinInit() 39 spinlock->realSpinlock = NULL; in OsalSpinInit() 51 if (spinlock == NULL || spinlock->realSpinlock == NULL) { in OsalSpinDestroy() 56 OsalMemFree(spinlock->realSpinlock); in OsalSpinDestroy() 57 spinlock->realSpinlock = NULL; in OsalSpinDestroy() 65 if (spinlock == NULL || spinlock->realSpinlock == NULL) { in OsalSpinLock() 78 if (spinlock == NULL || spinlock->realSpinlock == NULL) { in OsalSpinUnlock() 91 if (spinlock == NULL || spinlock->realSpinlock == NULL) { in OsalSpinLockIrq() 104 if (spinlock == NULL || spinlock->realSpinlock == NULL) { in OsalSpinUnlockIrq() 119 if (spinlock == NULL || spinlock->realSpinlock == NULL || flags == NULL) { in OsalSpinLockIrqSave() [all …]
|
/ohos5.0/drivers/hdf_core/adapter/khdf/liteos_m/osal/src/ |
H A D | osal_spinlock.c | 39 int32_t OsalSpinInit(OsalSpinlock *spinlock) in OsalSpinInit() argument 44 if (spinlock == NULL) { in OsalSpinInit() 65 if (spinlock == NULL || spinlock->realSpinlock == (void *)(uintptr_t)HDF_INVALID_MUX_ID) { in OsalSpinDestroy() 80 int32_t OsalSpinLock(OsalSpinlock *spinlock) in OsalSpinLock() argument 84 if (spinlock == NULL || spinlock->realSpinlock == (void *)(uintptr_t)HDF_INVALID_MUX_ID) { in OsalSpinLock() 98 int32_t OsalSpinUnlock(OsalSpinlock *spinlock) in OsalSpinUnlock() argument 102 if (spinlock == NULL || spinlock->realSpinlock == (void *)(uintptr_t)HDF_INVALID_MUX_ID) { in OsalSpinUnlock() 118 return OsalSpinLock(spinlock); in OsalSpinLockIrq() 123 return OsalSpinUnlock(spinlock); in OsalSpinUnlockIrq() 129 return OsalSpinLock(spinlock); in OsalSpinLockIrqSave() [all …]
|
/ohos5.0/drivers/hdf_core/adapter/khdf/uniproton/osal/src/ |
H A D | osal_spinlock.c | 39 int32_t OsalSpinInit(OsalSpinlock *spinlock) in OsalSpinInit() argument 41 (void)spinlock; in OsalSpinInit() 51 (void)spinlock; in OsalSpinDestroy() 59 int32_t OsalSpinLock(OsalSpinlock *spinlock) in OsalSpinLock() argument 61 (void)spinlock; in OsalSpinLock() 69 int32_t OsalSpinUnlock(OsalSpinlock *spinlock) in OsalSpinUnlock() argument 71 (void)spinlock; in OsalSpinUnlock() 85 return OsalSpinLock(spinlock); in OsalSpinLockIrq() 94 return OsalSpinUnlock(spinlock); in OsalSpinUnlockIrq() 104 return OsalSpinLock(spinlock); in OsalSpinLockIrqSave() [all …]
|
/ohos5.0/drivers/hdf_core/framework/support/posix/src/ |
H A D | osal_spinlock.c | 16 int32_t OsalSpinInit(OsalSpinlock *spinlock) in OsalSpinInit() argument 21 if (spinlock == NULL) { in OsalSpinInit() 26 spinlock->realSpinlock = NULL; in OsalSpinInit() 40 spinlock->realSpinlock = (void *)spinTmp; in OsalSpinInit() 45 int32_t OsalSpinDestroy(OsalSpinlock *spinlock) in OsalSpinDestroy() argument 49 if (spinlock == NULL || spinlock->realSpinlock == NULL) { in OsalSpinDestroy() 60 OsalMemFree(spinlock->realSpinlock); in OsalSpinDestroy() 61 spinlock->realSpinlock = NULL; in OsalSpinDestroy() 66 int32_t OsalSpinLock(OsalSpinlock *spinlock) in OsalSpinLock() argument 70 if (spinlock == NULL || spinlock->realSpinlock == NULL) { in OsalSpinLock() [all …]
|
/ohos5.0/drivers/hdf_core/interfaces/inner_api/osal/shared/ |
H A D | osal_spinlock.h | 55 #define OSAL_DECLARE_SPINLOCK(spinlock) OsalSpinlock spinlock argument 73 int32_t OsalSpinInit(OsalSpinlock *spinlock); 90 int32_t OsalSpinDestroy(OsalSpinlock *spinlock); 107 int32_t OsalSpinLock(OsalSpinlock *spinlock); 124 int32_t OsalSpinUnlock(OsalSpinlock *spinlock); 141 int32_t OsalSpinLockIrq(OsalSpinlock *spinlock); 158 int32_t OsalSpinUnlockIrq(OsalSpinlock *spinlock); 176 int32_t OsalSpinLockIrqSave(OsalSpinlock *spinlock, uint32_t *flags); 194 int32_t OsalSpinUnlockIrqRestore(OsalSpinlock *spinlock, uint32_t *flags);
|
/ohos5.0/foundation/communication/dsoftbus/components/nstackx/nstackx_util/interface/ |
H A D | nstackx_spinlock.h | 42 static inline void SpinLockInit(Spinlock *spinlock) in SpinLockInit() argument 44 spinlock->lock = 0; in SpinLockInit() 47 static inline int SpinLockTryLock(Spinlock *spinlock) in SpinLockTryLock() argument 49 if (__sync_bool_compare_and_swap(&spinlock->lock, 0, 1) == 0) { in SpinLockTryLock() 56 static inline void SpinLock(Spinlock *spinlock) in SpinLock() argument 58 while (!SpinLockTryLock(spinlock)) { in SpinLock() 61 } while (!!spinlock->lock); in SpinLock() 65 static inline void SpinUnlock(Spinlock *spinlock) in SpinUnlock() argument 67 __sync_lock_release(&spinlock->lock); in SpinUnlock()
|
/ohos5.0/drivers/hdf_core/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/ |
H A D | posix_fuzzer.cpp | 105 OsalSpinlock spinlock; in FuncOsalSpinLock() local 106 OsalSpinInit(&spinlock); in FuncOsalSpinLock() 108 std::thread thrd([&spinlock] { in FuncOsalSpinLock() 110 OsalSpinUnlock(&spinlock); in FuncOsalSpinLock() 112 OsalSpinLock(&spinlock); in FuncOsalSpinLock() 113 OsalSpinDestroy(&spinlock); in FuncOsalSpinLock()
|
/ohos5.0/docs/en/device-dev/driver/ |
H A D | driver-platform-clock-develop.md | 60 … core layer provides the default **ClockLockMethod** method, in which a spinlock is used to protec… 88 If spinlock cannot be used, you can use another type of lock to implement **ClockLockMethod**. The …
|
H A D | driver-platform-adc-develop.md | 66 …ents. The core layer provides the default **AdcLockMethod**, in which a spinlock is used to protec… 92 If spinlock cannot be used, you can use another type of lock to implement **AdcLockMethod**. The cu…
|
H A D | driver-platform-dac-develop.md | 80 …ents. The core layer provides the default **DacLockMethod**, in which a spinlock is used to protec… 107 If spinlock cannot be used, you can use another type of lock to implement **DacLockMethod**. The im…
|
H A D | driver-platform-watchdog-develop.md | 166 …OsalSpinlock lock; // (Mandatory) You need to implement the spinlock for your wat…
|