Konstantin Khomoutov
unread,Mar 29, 2016, 12:26:42 PM3/29/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Sam Whited, Konstantin Khomoutov, Ian Lance Taylor, Marvin Stenger, golang-nuts
No, the 3rd section of manual pages on Linux-based systems means
facilities provided by libraries -- either libc or other user-space
stuff. This means cgo. Go-specific code should strive to rely on
system calls only; and for x/sys/unix it is, I assume, a must except
we're talking about some "weird" platforms like Solaris (?) which must
route all calls to the kernel through libc. On Linux-based systems,
syscalls are described by the pages in the 2nd section, so here we go:
~% apropos semaphore | grep -F '(2)'
semctl (2) - System V semaphore control operations
semget (2) - get a System V semaphore set identifier
semop (2) - System V semaphore operations
semtimedop (2) - System V semaphore operations
Quick googling reveals that indeed this appears to be a rather complete
set of stuff to deal with semaphores.