From 795884dbf1cbf584ea3455c634d8e289eb04d424 Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Wed, 8 Jun 2022 13:56:13 +0800 Subject: [PATCH] sys/ipc: correct definition value of IPC_* the definition of MSG_NOERROR and IPC_NOWAIT should not be aligned ------------------------------------------------------------------ MSGOP(2) NAME msgrcv, msgsnd - System V message queue operations ... EXAMPLE The program below demonstrates the use of msgsnd() and msgrcv(). ... if (msgrcv(qid, (void *) &msg, sizeof(msg.mtext), msgtype, MSG_NOERROR | IPC_NOWAIT) == -1) { ... Signed-off-by: chao.an --- include/sys/ipc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/sys/ipc.h b/include/sys/ipc.h index 724654305b..6c6d3f953a 100644 --- a/include/sys/ipc.h +++ b/include/sys/ipc.h @@ -35,10 +35,10 @@ /* Mode bits: The lower order 9-bit bits are the standard mode bits */ -#define IPC_MODE 0x01ff /* Mode bit mask */ -#define IPC_CREAT (1 << 10) /* Create entry if key does not exist */ -#define IPC_EXCL (1 << 11) /* Fail if key exists */ -#define IPC_NOWAIT (1 << 12) /* Error if request must wait */ +#define IPC_MODE 0x01ff /* Mode bit mask */ +#define IPC_CREAT 0x0200 /* Create key if key does not exist. */ +#define IPC_EXCL 0x0400 /* Fail if key exists. */ +#define IPC_NOWAIT 0x0800 /* Return error on wait. */ /* Keys: */