Home
last modified time | relevance | path

Searched refs:spinlock (Results 1 - 25 of 36) sorted by relevance

12

/third_party/node/deps/uv/src/unix/
H A Dspinlock.h28 UV_UNUSED(static void uv_spinlock_init(uv_spinlock_t* spinlock));
29 UV_UNUSED(static void uv_spinlock_lock(uv_spinlock_t* spinlock));
30 UV_UNUSED(static void uv_spinlock_unlock(uv_spinlock_t* spinlock));
31 UV_UNUSED(static int uv_spinlock_trylock(uv_spinlock_t* spinlock));
33 UV_UNUSED(static void uv_spinlock_init(uv_spinlock_t* spinlock)) { in UV_UNUSED() argument
34 ACCESS_ONCE(int, spinlock->lock) = 0; in UV_UNUSED()
37 UV_UNUSED(static void uv_spinlock_lock(uv_spinlock_t* spinlock)) { in UV_UNUSED() argument
38 while (!uv_spinlock_trylock(spinlock)) cpu_relax(); in UV_UNUSED()
41 UV_UNUSED(static void uv_spinlock_unlock(uv_spinlock_t* spinlock)) { in UV_UNUSED() argument
42 ACCESS_ONCE(int, spinlock in UV_UNUSED()
45 UV_UNUSED(static int uv_spinlock_trylock(uv_spinlock_t* spinlock)) UV_UNUSED() argument
[all...]
/third_party/skia/third_party/externals/abseil-cpp/absl/base/
H A Dspinlock_test_common.cc16 // spinlock. If the spinlock is working properly, all elements of the
31 #include "absl/base/internal/spinlock.h"
82 static void TestFunction(int thread_salt, SpinLock* spinlock) { in TestFunction() argument
84 SpinLockHolder h(spinlock); in TestFunction()
93 static void ThreadedTest(SpinLock* spinlock) { in ThreadedTest() argument
97 threads.push_back(std::thread(TestFunction, i, spinlock)); in ThreadedTest()
103 SpinLockHolder h(spinlock); in ThreadedTest()
114 SpinLock spinlock(base_internal::SCHEDULE_KERNEL_ONLY); in TEST()
115 spinlock in TEST()
200 SpinLock spinlock; TEST() local
[all...]
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/
H A D1-1.c13 * 1. Initialize a pthread_spinlock_t object 'spinlock' with
15 * 2. Main thread lock 'spinlock' with pthread_spin_lock(), should get the lock
16 * 3. Main thread unlock 'spinlock'
17 * 4. Create a child thread. The thread try to lock 'spinlock', with
20 * 6. Main thread lock 'spinlock', using pthread_spin_trylock(), should get
22 * 7. Main thread unlock 'spinlock'
32 static pthread_spinlock_t spinlock; variable
47 rc = pthread_spin_trylock(&spinlock); in fn_chld()
56 if (pthread_spin_unlock(&spinlock)) { in fn_chld()
72 if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVAT in main()
[all...]
H A D1-2.c14 * unresponsive. The child will spin on the spinlock, no other process
18 * 1. Initialize a pthread_spinlock_t object 'spinlock' with
20 * 2. Main thread lock 'spinlock', should get the lock
21 * 3. Create a child thread. The thread lock 'spinlock' with pthread_spin_lock()
23 * 4. Main thread unlock 'spinlock'
24 * 5. Child thread should get 'spinlock'
34 static pthread_spinlock_t spinlock; variable
49 rc = pthread_spin_lock(&spinlock); in fn_chld()
61 if (pthread_spin_unlock(&spinlock)) { in fn_chld()
77 if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVAT in main()
[all...]
H A D3-1.c16 * 1. Create a thread that will initialize and lock a spinlock
17 * 2. Main will try to unlock the spinlock (it doesn't hold the lock)
32 static pthread_spinlock_t spinlock; variable
45 if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) { in fn_chld()
50 /* Lock the spinlock */ in fn_chld()
52 rc = pthread_spin_lock(&spinlock); in fn_chld()
60 /* Wait for main to try and unlock this spinlock */ in fn_chld()
66 pthread_spin_unlock(&spinlock); in fn_chld()
68 if (pthread_spin_destroy(&spinlock) != 0) { in fn_chld()
84 /* Create a thread that will initialize and lock a spinlock */ in main()
[all...]
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/
H A D2-1.c16 * 1. Create a piece of shared memory object, create a spin lock 'spinlock' and
18 * 2. Parent map the shared memory to its memory space, put 'spinlock' into it;
36 pthread_spinlock_t spinlock; member
82 /* Initialize spinlock */ in main()
83 if ((pthread_spin_init(&(spinlock_data->spinlock), pshared)) != 0) { in main()
89 if ((pthread_spin_lock(&(spinlock_data->spinlock))) != 0) { in main()
95 /* Initialize spinlock data */ in main()
109 /* wait until child writes to spinlock data */ in main()
114 if (pthread_spin_unlock(&(spinlock_data->spinlock)) != 0) { in main()
155 if ((pthread_spin_trylock(&(spinlock_data->spinlock))) ! in main()
[all...]
H A D2-2.c19 * 1. Create a piece of shared memory object, create a spin lock 'spinlock' and
21 * 2. Parent map the shared memory to its memory space, put 'spinlock' into it;
43 pthread_spinlock_t spinlock; member
90 if ((pthread_spin_init(&(spinlock_data->spinlock), pshared)) != 0) { in main()
96 if ((pthread_spin_lock(&(spinlock_data->spinlock))) != 0) { in main()
102 /* Initialized spinlock data */ in main()
115 /* wait until child writes to spinlock data */ in main()
120 if (pthread_spin_unlock(&(spinlock_data->spinlock)) != 0) { in main()
161 rc = pthread_spin_trylock(&(spinlock_data->spinlock)); in main()
175 rc = pthread_spin_trylock(&(spinlock_data->spinlock)); in main()
[all...]
H A D1-1.c14 * 1. Initialize a pthread_spinlock_t object 'spinlock' with
16 * 2. Main thread lock 'spinlock', should get the lock
17 * 3. Main thread unlock 'spinlock'
18 * 4. Main thread destroy the 'spinlock'
29 static pthread_spinlock_t spinlock; variable
42 rc = pthread_spin_init(&spinlock, pshared); in main()
51 if (pthread_spin_lock(&spinlock) != 0) { in main()
59 if (pthread_spin_unlock(&spinlock) != 0) { in main()
64 rc = pthread_spin_destroy(&spinlock); in main()
H A D4-1.c17 * 1. Initialize a pthread_spinlock_t object 'spinlock' with
19 * 2. Main thread lock 'spinlock', should get the lock
33 static pthread_spinlock_t spinlock; variable
41 rc = pthread_spin_init(&spinlock, pshared); in fn_chld()
47 ("Test PASSED: *Note: Did not return EBUSY when initializing a spinlock already in use, but standard says 'may' fail\n"); in fn_chld()
65 rc = pthread_spin_init(&spinlock, pshared); in main()
74 if (pthread_spin_lock(&spinlock) != 0) { in main()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/
H A D1-2.c15 * 1. Initialize a pthread_spinlock_t object 'spinlock' with
17 * 2. Main thread lock 'spinlock', should get the lock
18 * 3. Create a child thread. The thread lock 'spinlock', should spin.
19 * 4. Main thread unlock 'spinlock'
20 * 5. Child thread should get 'spinlock'
30 static pthread_spinlock_t spinlock; variable
44 /* Lock the spinlock */ in fn_chld()
46 rc = pthread_spin_lock(&spinlock); in fn_chld()
60 if (pthread_spin_unlock(&spinlock)) { in fn_chld()
76 /* Initialize spinlock */ in main()
[all...]
H A D3-1.c30 ("Test PASSED: *Note: Did not return EDEADLK when re-locking a spinlock already in use, but standard says 'may' fail\n"); in sig_handler()
37 pthread_spinlock_t spinlock; in main() local
46 if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) { in main()
54 if (pthread_spin_lock(&spinlock) != 0) { in main()
65 rc = pthread_spin_lock(&spinlock); in main()
74 ("Test PASSED: *Note: Did not return EDEADLK when re-locking a spinlock already in use, but standard says 'may' fail\n"); in main()
77 /* Unlock spinlock */ in main()
78 pthread_spin_unlock(&spinlock); in main()
80 /* Destroy spinlock */ in main()
81 pthread_spin_destroy(&spinlock); in main()
[all...]
H A D3-2.c36 ("Test PASSED: *Note: Did not return EINVAL when attempting to lock an uninitialized spinlock, but standard says 'may' fail\n"); in sig_handler()
44 pthread_spinlock_t spinlock; in main() local
58 /* Attempt to lock an uninitialized spinlock */ in main()
59 rc = pthread_spin_lock(&spinlock); in main()
65 /* Unlock spinlock */ in main()
66 pthread_spin_unlock(&spinlock); in main()
68 /* Destroy spinlock */ in main()
69 pthread_spin_destroy(&spinlock); in main()
H A D1-1.c15 * 1. Initialize a pthread_spinlock_t object 'spinlock' with
17 * 2. Main thread lock 'spinlock', should get the lock
18 * 3. Create a child thread. The thread lock 'spinlock', should spin.
30 static pthread_spinlock_t spinlock; variable
74 rc = pthread_spin_lock(&spinlock); in fn_chld()
113 if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) { in main()
121 if (pthread_spin_lock(&spinlock) != 0) { in main()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_destroy/
H A D1-1.c13 * 1. Initialize a pthread_spinlock_t object 'spinlock' with
15 * 2. Main thread lock 'spinlock', should get the lock
16 * 3. Main thread unlock 'spinlock'
17 * 4. Main thread destroy the 'spinlock'
27 static pthread_spinlock_t spinlock; variable
34 if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) { in main()
42 if (pthread_spin_lock(&spinlock) != 0) { in main()
51 if (pthread_spin_unlock(&spinlock) != 0) { in main()
57 rc = pthread_spin_destroy(&spinlock); in main()
H A D3-1.c17 * 1. Initialize a pthread_spinlock_t object 'spinlock' with
19 * 2. Main thread lock 'spinlock', should get the lock
32 static pthread_spinlock_t spinlock; variable
39 rc = pthread_spin_destroy(&spinlock); in fn_chld()
46 ("Test PASSED: *Note: Did not return EBUSY when destroying a spinlock already in use, but standard says 'may' fail\n"); in fn_chld()
55 if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) { in main()
63 if (pthread_spin_lock(&spinlock) != 0) { in main()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/
H A D1-1.c13 * 1. Initialize a pthread_spinlock_t object 'spinlock' with
15 * 2. Main thread lock 'spinlock', using pthread_spin_trylock(),
17 * 3. Create a child thread. The thread lock 'spinlock',
31 static pthread_spinlock_t spinlock; variable
70 rc = pthread_spin_trylock(&spinlock); in fn_chld()
80 if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) { in main()
88 if (pthread_spin_trylock(&spinlock) != 0) { in main()
H A D4-1.c28 pthread_spinlock_t spinlock; in main() local
33 rc = pthread_spin_trylock(&spinlock); in main()
/third_party/skia/third_party/externals/abseil-cpp/absl/base/internal/
H A Dspinlock_benchmark.cc20 #include "absl/base/internal/spinlock.h"
34 static auto* spinlock = new absl::base_internal::SpinLock(scheduling_mode); in BM_SpinLock() local
36 absl::base_internal::SpinLockHolder holder(spinlock); in BM_SpinLock()
/third_party/NuttX/drivers/usbdev/gadget/fconfig/include/
H A Df_common.h51 #include <linux/spinlock.h>
H A Dobj_ref.h46 #include <linux/spinlock.h>
H A Dusb_obj.h45 #include <linux/spinlock.h>
/third_party/FreeBSD/sys/compat/linuxkpi/common/include/linux/
H A Dwait.h34 #include <linux/spinlock.h>
/third_party/ltp/testcases/kdump/lib/crasher/
H A Dcrasher.c26 #include <linux/spinlock.h>
80 case '3': /* hang w/double spinlock */ in crasher_write()
/third_party/node/deps/openssl/config/archs/linux-armv4/asm_avx2/crypto/
H A Darmv4cpuid.S31 add r6,r3,r2 @ &spinlock
42 str r0,[r6] @ release spinlock
/third_party/node/deps/openssl/config/archs/linux-armv4/asm/crypto/
H A Darmv4cpuid.S31 add r6,r3,r2 @ &spinlock
42 str r0,[r6] @ release spinlock

Completed in 7 milliseconds

12