Dani Rodríguez
dc86e4053e
This commit introduces a new iteration in the spinlock data structure. It also moves the spinlock into the new directory structure, removing it from the legacy arch/ directory. spinlock.h is a public API in the sys/ directory, so it is shared. However, the implementation for each function must be provided in a C file part of the architecture directory, such as kernel/i386 or kernel/aarch64. The following changes have been made to the second iteration of the spinlock API: * The locks are now actually atomic, and they use the XCHG assembly instruction rather than the stub that the first iteration used to use (switching variables in C is something but it is not atomic). * Removes spinlock_try_lock() function, since it is not going to be used. This also makes the API more simple, because every function part of the Spinlock API is now void. These functions will act as memory barriers that do not return a value and that block until the lock is acquired. Fixes #14 (https://redmine.danirod.es/issues/14) |
||
---|---|---|
.. | ||
idt.c | ||
lidt.S |