summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
Diffstat (limited to 'kern')
-rw-r--r--kern/task.h8
-rw-r--r--kern/thread.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/kern/task.h b/kern/task.h
index 2a4c28f..93087ff 100644
--- a/kern/task.h
+++ b/kern/task.h
@@ -89,7 +89,7 @@ struct task {
time_value_t creation_time; /* time stamp at creation */
/* IPC structures */
- decl_simple_lock_data(, itk_lock_data)
+ struct lock itk_lock_data;
struct ipc_port *itk_self; /* not a right, doesn't hold ref */
struct ipc_port *itk_sself; /* a send right */
struct ipc_port *itk_exception; /* a send right */
@@ -128,9 +128,9 @@ struct task {
#define task_lock(task) simple_lock(&(task)->lock)
#define task_unlock(task) simple_unlock(&(task)->lock)
-#define itk_lock_init(task) simple_lock_init(&(task)->itk_lock_data)
-#define itk_lock(task) simple_lock(&(task)->itk_lock_data)
-#define itk_unlock(task) simple_unlock(&(task)->itk_lock_data)
+#define itk_lock_init(task) lock_init(&(task)->itk_lock_data, FALSE)
+#define itk_lock(task) lock_write(&(task)->itk_lock_data)
+#define itk_unlock(task) lock_write_done(&(task)->itk_lock_data)
/*
* Exported routines/macros
diff --git a/kern/thread.h b/kern/thread.h
index 0e85d8c..adf8b86 100644
--- a/kern/thread.h
+++ b/kern/thread.h
@@ -168,7 +168,7 @@ struct thread {
See ipc_kmsg_destroy() for more details. */
struct ipc_kmsg_queue ith_messages;
- decl_simple_lock_data(, ith_lock_data)
+ struct lock ith_lock_data;
struct ipc_port *ith_self; /* not a right, doesn't hold ref */
struct ipc_port *ith_sself; /* a send right */
struct ipc_port *ith_exception; /* a send right */