bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] ipc: perform conditional locking while changing the port sequenc


From: Marin Ramesa
Subject: [PATCH] ipc: perform conditional locking while changing the port sequence number
Date: Sat, 07 Sep 2013 08:00:47 +0200

* ipc/ipc_port.c (ipc_port_set_seqno) [MACH_SLOCKS]: Conditional locking.
=46rom d56b769755a5d671f084ebdd482de8b34be9cd5b Mon Sep 17 00:00:00 2001
From: Marin Ramesa <address@hidden>
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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]