-1

I'd like to know why i should use one or the other and which one is best practice.

I know their use is different but in my experience i have not found any advantage in using one instead of the other.

Are there any reason to avoid using an implementation (other than code readability)?

zurg
  • 13
  • 4

1 Answers1

0

Different API's from different versions of UNIX. semctl et al, are from System V, while sem_init et al, are POSIX.

While they can be used for the same thing, they are not compatible with each other. You can't mix semctl with sem_post for example.

Some programmer dude
  • 400,186
  • 35
  • 402
  • 621