summaryrefslogblamecommitdiff
path: root/src/mq/mq_unlink.c
blob: 6a08a4c57eaa69088e4dc20afd55a69989a0eacd (plain) (tree)
1
2
3
4
5
6
7
8






                               
                                 







                                                 
#include <mqueue.h>
#include <errno.h>
#include "syscall.h"

int mq_unlink(const char *name)
{
	int ret;
	if (*name == '/') name++;
	ret = __syscall(SYS_mq_unlink, name);
	if (ret < 0) {
		if (ret == -EPERM) ret = -EACCES;
		errno = -ret;
		return -1;
	}
	return ret;
}