summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2022-12-20 20:01:02 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-12-21 12:55:46 +0100
commit448889a4f0c32ba8ea61f870d4edcb0e0d58af85 (patch)
treecad56c7263667bb09096cc05c707130d3809544a /ipc
parent28ac48ba2371ad6f76f263e56dcf0090fe0d6087 (diff)
Use -Wstrict-prototypes and fix warnings
Most of the changes include defining and using proper function type declarations (with argument types declared) and avoiding using the K&R style of function declarations. Message-Id: <Y6Jazsuis1QA0lXI@mars>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_mqueue.c4
-rw-r--r--ipc/ipc_mqueue.h2
-rw-r--r--ipc/mach_msg.c10
3 files changed, 8 insertions, 8 deletions
diff --git a/ipc/ipc_mqueue.c b/ipc/ipc_mqueue.c
index a371a625..ac6bed51 100644
--- a/ipc/ipc_mqueue.c
+++ b/ipc/ipc_mqueue.c
@@ -259,7 +259,7 @@ ipc_mqueue_send(
ip_unlock(port);
counter(c_ipc_mqueue_send_block++);
- thread_block((void (*)(void)) 0);
+ thread_block(thread_no_continuation);
ip_lock(port);
/* why did we wake up? */
@@ -520,7 +520,7 @@ ipc_mqueue_receive(
mach_msg_size_t max_size,
mach_msg_timeout_t time_out,
boolean_t resume,
- void (*continuation)(void),
+ continuation_t continuation,
ipc_kmsg_t *kmsgp,
mach_port_seqno_t *seqnop)
{
diff --git a/ipc/ipc_mqueue.h b/ipc/ipc_mqueue.h
index efca6817..dfac7456 100644
--- a/ipc/ipc_mqueue.h
+++ b/ipc/ipc_mqueue.h
@@ -75,7 +75,7 @@ ipc_mqueue_copyin(ipc_space_t, mach_port_name_t, ipc_mqueue_t *, ipc_object_t *)
extern mach_msg_return_t
ipc_mqueue_receive(ipc_mqueue_t, mach_msg_option_t,
mach_msg_size_t, mach_msg_timeout_t,
- boolean_t, void (*)(),
+ boolean_t, continuation_t,
ipc_kmsg_t *, mach_port_seqno_t *);
/*
diff --git a/ipc/mach_msg.c b/ipc/mach_msg.c
index aa8cdb5b..420e2a26 100644
--- a/ipc/mach_msg.c
+++ b/ipc/mach_msg.c
@@ -789,7 +789,7 @@ mach_msg_trap(
self->ith_object = rcv_object;
self->ith_mqueue = rcv_mqueue;
- if ((receiver->swap_func == (void (*)()) mach_msg_continue) &&
+ if ((receiver->swap_func == mach_msg_continue) &&
thread_handoff(self, mach_msg_continue, receiver)) {
assert(current_thread() == receiver);
@@ -798,7 +798,7 @@ mach_msg_trap(
* because the receiver is using no options.
*/
} else if ((receiver->swap_func ==
- (void (*)()) exception_raise_continue) &&
+ exception_raise_continue) &&
thread_handoff(self, mach_msg_continue, receiver)) {
counter(c_mach_msg_trap_block_exc++);
assert(current_thread() == receiver);
@@ -830,7 +830,7 @@ mach_msg_trap(
assert(current_thread() == receiver);
if ((receiver->swap_func ==
- (void (*)()) mach_msg_receive_continue) &&
+ mach_msg_receive_continue) &&
((receiver->ith_option & MACH_RCV_NOTIFY) == 0)) {
/*
* We can still use the optimized code.
@@ -1669,8 +1669,8 @@ mach_msg_interrupt(thread_t thread)
{
ipc_mqueue_t mqueue;
- assert((thread->swap_func == (void (*)()) mach_msg_continue) ||
- (thread->swap_func == (void (*)()) mach_msg_receive_continue));
+ assert((thread->swap_func == mach_msg_continue) ||
+ (thread->swap_func == mach_msg_receive_continue));
mqueue = thread->ith_mqueue;
imq_lock(mqueue);