Changes between Version 11 and Version 12 of kernel_synchro
- Timestamp:
- Mar 26, 2020, 2:37:13 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
kernel_synchro
v11 v12 54 54 == F) Locks debug == 55 55 56 When the DEBUG_BUSYLOCK parameter is set in the kernel_config.h file, an optional debug mechanism is activated, thanks to conditional compilation.56 Each busylock (remote and local) contains a "file" field defining the specific resource protected by this lock, that takes a non-zero value at lock initialization. 57 57 58 Each thread contains - besides the ''busylocks'' counter - an optional ''busylocks_root'' field, that is the root of the embedded xlist of (local or remote) busylocks hold by a given thread at a given time. This list is implemented by an optional ''xlist'' field in the busy lock descriptor. It is dynamically updated by the ''busylock_acquire()'' and ''busylock_release()'' functions. The set of taken busylocks is printed in the error message, when the scheduler detects that a descheduling thread is holding one or several busylocks. This list can also be be printed through the ''idbg'' interactive debugger, for any thread identified by its (pid,trdid).58 When the DEBUG_BUSYLOCK parameter is set to a non-zero value in the kernel_config.h file, two optional debug mechanism are activated, thanks to conditional compilation. 59 59 60 Moreover, when the DEBUG_BUSYLOCK is set, it is possible to trace all busylocck_acquire() / busylock_release() for one single thread, by setting a non zero value for the the DEBUG_BUSYLOCK_THREAD_XP parameter. 60 1. Each thread contains - besides the ''busylocks'' counter - an optional ''busylocks_root'' field, that is the root of an embedded xlist of (local or remote) busylocks hold by a given thread at a given time. This list is implemented by an optional ''xlist'' field in the busy lock descriptor. It is dynamically updated by the ''busylock_acquire()'' and ''busylock_release()'' functions. The set of taken busylocks is printed in the error message, when the scheduler detects that a descheduling thread is holding one or several busylocks. This list can also be be printed through the ''idbg'' interactive debugger, for any thread identified by its (pid,trdid). 61 62 2. Moreover, when the DEBUG_BUSYLOCK is set, it is possible to trace all busylock_acquire() / busylock_release() made by the thread, identified by the DEBUG_BUSYLOCK_PID and DEBUG_BUSYLOCK_TRDID parameters. 61 63 62 64