Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/sys/linux/mq_close.c')
-rw-r--r--newlib/libc/sys/linux/mq_close.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/newlib/libc/sys/linux/mq_close.c b/newlib/libc/sys/linux/mq_close.c
deleted file mode 100644
index 884c30f64..000000000
--- a/newlib/libc/sys/linux/mq_close.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright 2002, Red Hat Inc. */
-
-#include <mqueue.h>
-#include <errno.h>
-#include <sys/sem.h>
-#define _LIBC 1
-#include <sys/lock.h>
-#undef _LIBC
-
-#include "mqlocal.h"
-
-int
-mq_close (mqd_t msgid)
-{
- struct libc_mq *info;
- struct sembuf sb0 = {0, -1, 0};
- int rc;
- int semid;
-
- info = __find_mq (msgid);
-
- if (info == NULL)
- {
- errno = EBADF;
- return -1;
- }
-
- /* lock message queue */
- semid = info->semid;
- rc = semop (semid, &sb0, 1);
-
- if (rc == 0)
- {
- __cleanup_mq (msgid);
-
- /* unlock message queue */
- sb0.sem_op = 1;
- semop (semid, &sb0, 1);
- }
-
- return rc;
-}
-
-
-
-
-
-