* ipc/ipc_port.c (ipc_port_set_seqno) [MACH_SLOCKS]: Conditional locking.
=46rom d56b769755a5d671f084ebdd482de8b34be9cd5b Mon Sep 17 00:00:00 2001 From: Marin Ramesa <m...@hi.t-com.hr> Date: Sat, 7 Sep 2013 07:37:42 +0200 Subject: [PATCH] perform conditional locking while changing the port sequence number
--- ipc/ipc_port.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ipc/ipc_port.c b/ipc/ipc_port.c index b960739..19d1a9e 100644 --- a/ipc/ipc_port.c +++ b/ipc/ipc_port.c @@ -417,11 +417,17 @@ ipc_port_set_seqno(port, seqno) ipc_port_t port; mach_port_seqno_t seqno; { + #if MACH_SLOCKS ipc_mqueue_t mqueue; mqueue = ipc_port_lock_mqueue(port); + #endif /* MACH_SLOCKS */ + port->ip_seqno = seqno; + + #if MACH_SLOCKS imq_unlock(mqueue); + #endif /* MACH_SLOCKS */ } /* -- 1.8.1.4