#include <sys/sem.h>
/*#include <sys/types.h>*/
/*Unlock spin lock:*/
void spin_unlock(lok)
     int *lok;
{
  struct sembuf sembuffer, *sops;
  sops = &sembuffer;
  sops->sem_num = 0;
  sops->sem_op = 1;
  sops->sem_flg = 0;
  if (semop(*lok, sops, 1) < 0) {
    perror("semop");
    exit(1);
  }
}

