OS4 DepotLogo by McFly 
(anonymous IP: 3.149.213.209,0) 
 HomeRecentStatsSearchMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 

 Categories

   o Audio (343)
   o Datatype (51)
   o Demo (203)
   o Development (596)
   o Document (22)
   o Driver (97)
   o Emulation (147)
   o Game (1004)
   o Graphics (497)
   o Library (115)
   o Network (232)
   o Office (66)
   o Utility (923)
   o Video (69)

Total files: 4365

Full index file
Recent index file

 Links

  Amigans.net
  OpenAmiga
  Aminet
  UtilityBase
  IntuitionBase
  AmigaBounty


Support the site


 Readme for:  Development » Library » Misc » libpsem.lha

libpsem

Description: POSIX semaphore implementation
Download: libpsem.lha       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 176kb
Version: 20221203
Date: 04 Dec 22
Author: Fredrik Wikström
Submitter: Fredrik Wikström
Email: fredrik/a500 org
Category: development/library/misc
Replaces: development/library/misc/libpsem.lha
License: BSD
Distribute: yes
Min OS Version: 4.0
FileID: 12326
 
Comments: 0
Snapshots: 0
Videos: 0
Downloads:  (Current version)
 (Accumulated)

[Show comments] [Show snapshots] [Show videos] [Show content] [Show crashlogs] 
A simple AmigaOS native implementation of POSIX semaphores that can easily be
linked into any program that needs them (just add -lpsem to LIBS).

So far the following functions are supported by the library:
- sem_init()
- sem_destroy()
- sem_trywait()
- sem_wait()
- sem_timedwait()
- sem_post()
- sem_getvalue()

Installation is just a matter of opening a CLI and doing:
Copy SDK/#? ALL SDK:

The complete source code is also included in the archive under a 2-clause BSD
license.

Changes since the last release:

- Added missing cleanup code for the timer request on success in
  sem_timedwait().
- Rewrote the wait loops and made the code more safe.
- sem_getvalue() now returns a negative value if there are programs waiting on
  the semaphore.
- Added a clib2 compile of the static library.


Copyright (c) 2004-2024 by Björn Hagström All Rights Reserved
Amiga OS and its logos are registered trademarks of Hyperion Entertainment