//my_pxsem_mmap/sem_close.c
#include	"unpipc.h"
#include	"semaphore.h"

int
mysem_close(mysem_t *sem)
{
	if (sem->sem_magic != SEM_MAGIC) {
		errno = EINVAL;
		return(-1);
	}

if (munmap(sem, sizeof(mysem_t)) == -1)
		return(-1);
	return(0);
}
