#include "unp.h"
#include "unpipc.h"

int main(int argc, char **argv)
{
	sem_t *sem;
	int semval;
	/********************** create Semaphore mutex ********************/
	sem = Sem_open(SEM_NAME, 0);
	/******************************************************************/

	Sem_getvalue(sem, &semval);
	fprintf(stderr, "----------- present posix semaphore value : %d -------------\n", semval);
	/*
	Sem_post(sem);
	Sem_getvalue(sem, &semval);
	fprintf(stderr, "----------- posix semaphore value after post: %d -------------\n", semval);
	*/
	Sem_close(sem);
	return 0;
}
