The Wayback Machine - https://web.archive.org/web/20150921005511/http://perldoc.perl.org:80/functions/semop.html

Perl version

Modules

  • ABCDE
  • FGHIL
  • MNOPS
  • TUX

semop

Perl 5 version 22.0 documentation

Please note: Many features of this site require JavaScript. You appear to have JavaScript disabled, or are running a non-JavaScript capable web browser.

To get the best experience, please enable JavaScript or download a modern web browser such as Internet Explorer 8, Firefox, Safari, or Google Chrome.

Recently read

semop

  • semop KEY,OPSTRING

    Calls the System V IPC function semop(2) for semaphore operations such as signalling and waiting. OPSTRING must be a packed array of semop structures. Each semop structure can be generated with pack("s!3", $semnum, $semop, $semflag) . The length of OPSTRING implies the number of semaphore operations. Returns true if successful, false on error. As an example, the following code waits on semaphore $semnum of semaphore id $semid:

    1. $semop = pack("s!3", $semnum, -1, 0);
    2. die "Semaphore trouble: $!\n" unless semop($semid, $semop);

    To signal the semaphore, replace -1 with 1 . See also SysV IPC in perlipc, IPC::SysV , and IPC::SysV::Semaphore documentation.

    Portability issues: semop in perlport.

 
Morty Proxy This is a proxified and sanitized view of the page, visit original site.