I am trying to use semaphores in C.
I have global variable: `sem_t array[5];'
And local sem_t MyArray[2]; in a function.
I initialise my semaphores.
for(i = 0; i < 5; i++)
    sem_init(&array[i], 0, 1);
I want to assign 2 of 5 semaphores from array to MyArray. So MyArray and MyArray+ 1 will be for instance array+3 and array+1 and this are the same addresses.
 
     
     
    