Changeset 603 for trunk/kernel/libk/remote_busylock.h
- Timestamp:
- Dec 3, 2018, 12:17:35 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/remote_busylock.h
r563 r603 1 1 /* 2 * remote_busylock.h: remote kernel busy 2 * remote_busylock.h: remote kernel busy-waiting lock definition. 3 3 * 4 4 * Authors Alain Greiner (2016,2017,2018) … … 33 33 * This synchronisation object sequencializes all concurrent read or write accesses to a 34 34 * shared object located in any cluster, made by any thread(s) running in any cluster. 35 * It uses a busy waiting policy when the tock is taken by another thread, and should35 * It uses a busy waiting policy when the lock is taken by another thread, and should 36 36 * be used ro execute very short actions, such as basic allocators, or to protect 37 37 * higher level synchronisation objects, such as remote_queuelock and remote_rwlock. 38 * 38 39 * WARNING: a thread cannot yield when it is owning a busylock (local or remote). 39 40 * … … 45 46 * decrements its busylocks counter. 46 47 * 47 :w* - When a thread takes a busylock, it enters a critical section: the busylock_acquire()48 * - When a thread takes a busylock, it enters a critical section: the busylock_acquire() 48 49 * function disables the IRQs, takes the lock, increments the thread busylocks counter, 49 * and save the SR inlock descriptor and returns.50 * save the SR in the lock descriptor and returns. 50 51 * 51 * - The busylock_release() function releases the lock, decrements the thread busylock52 * counter,restores the SR to exit the critical section, and returns52 * - The busylock_release() function decrements the thread busylock counter, 53 * restores the SR to exit the critical section, and returns 53 54 * 54 55 * - If a thread owning a busylock (local or remote) tries to deschedule, the scheduler … … 58 59 /******************************************************************************************* 59 60 * This structure defines a remote_busylock. 60 * The <type> and <xlist> fields are used for debug. 61 * The type defines the lock usage as detailed in the kernel_config.h file. 61 * - The <ticket> and <current> fields implement the ticket policy described above. 62 * - The <type> and <xlist> fields are used for debug. The type defines the lock usage, 63 * as detailed in the kernel_config.h file. 64 * - The <save_sr> field is used to implement the critical section as decribed above. 62 65 ******************************************************************************************/ 63 66
Note: See TracChangeset
for help on using the changeset viewer.