diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-02-15 23:40:54 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-02-15 23:40:56 +0100 |
commit | cb5e3ca248435f19fce0254987ba894a25611974 (patch) | |
tree | 0a381f24b9d537b10e2079e38a3adeb5da59fcc0 /device | |
parent | b0c0a49918b6fd5f75cbd7565429a1398ddc80a9 (diff) | |
download | gnumach-cb5e3ca248435f19fce0254987ba894a25611974.tar.gz gnumach-cb5e3ca248435f19fce0254987ba894a25611974.tar.bz2 gnumach-cb5e3ca248435f19fce0254987ba894a25611974.zip |
Document spl levels of locks taken during interrupts
Diffstat (limited to 'device')
-rw-r--r-- | device/ds_routines.c | 3 | ||||
-rw-r--r-- | device/io_req.h | 2 | ||||
-rw-r--r-- | device/tty.h | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/device/ds_routines.c b/device/ds_routines.c index 07ab7b30..94e61592 100644 --- a/device/ds_routines.c +++ b/device/ds_routines.c @@ -1507,8 +1507,9 @@ ds_no_senders(mach_no_senders_notification_t *notification) notification->not_count); } +/* Shall be taken at splio only */ +def_simple_lock_data(static, io_done_list_lock) /* Lock for... */ queue_head_t io_done_list; -def_simple_lock_data(static, io_done_list_lock) #define splio splsched /* XXX must block ALL io devices */ diff --git a/device/io_req.h b/device/io_req.h index b80b3dde..e66e0800 100644 --- a/device/io_req.h +++ b/device/io_req.h @@ -95,6 +95,8 @@ struct io_req { * locking is needed in this sequence. Unfortunately, a synchronous wait * for a buffer requires a lock to avoid problems if the wait and interrupt * happen simultaneously on different processors. + * + * Shall be taken at splio only */ #define ior_lock(ior) simple_lock(&(ior)->io_req_lock) diff --git a/device/tty.h b/device/tty.h index 0bdb2db9..b0f99cf5 100644 --- a/device/tty.h +++ b/device/tty.h @@ -43,7 +43,7 @@ #include <device/io_req.h> struct tty { - decl_simple_lock_data(,t_lock) + decl_simple_lock_data(,t_lock) /* Shall be taken at spltty only */ struct cirbuf t_inq; /* input buffer */ struct cirbuf t_outq; /* output buffer */ char * t_addr; /* device pointer */ |