summaryrefslogtreecommitdiff
path: root/src/kernel/lib
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2010-08-10 20:39:57 +0200
committerAlexis211 <alexis211@gmail.com>2010-08-10 20:39:57 +0200
commitf81bf65484fa8c81a1886f456c71f1e6eebe84e9 (patch)
tree146f304d8de8828003edd548df22cca581044017 /src/kernel/lib
parent0ec0ca40a4fedfe97c49903a329b2a9ad2e22d03 (diff)
downloadTCE-f81bf65484fa8c81a1886f456c71f1e6eebe84e9.tar.gz
TCE-f81bf65484fa8c81a1886f456c71f1e6eebe84e9.zip
Added a lot of comments in kernel code. A bit of cleaning too.
Diffstat (limited to 'src/kernel/lib')
-rw-r--r--src/kernel/lib/mutex.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/kernel/lib/mutex.c b/src/kernel/lib/mutex.c
index f3ed11f..2664eb0 100644
--- a/src/kernel/lib/mutex.c
+++ b/src/kernel/lib/mutex.c
@@ -1,6 +1,7 @@
#include "mutex.h"
#include <task/task.h>
+/* Internal use only. This function is atomic, meaning it cannot be interrupted by a system task switch. */
static uint32_t atomic_exchange(uint32_t* ptr, uint32_t newval) {
uint32_t r;
asm volatile("xchg (%%ecx), %%eax" : "=a"(r) : "c"(ptr), "a"(newval));