27 October 2022, 22:25 | #1 |
Registered User
Join Date: Apr 2009
Location: N/A
Posts: 962
|
How can I implement locks?
Hello, from what I can see pthreads are not available in amiga/vbcc? (not sure if in AmigaOS in general or just vbcc implementation). When I try to use #include <pthread.h> I get pthread.h not found.
Given this, is there any other way how I can implement a lock/release mechanism in C on Amiga OS? |
28 October 2022, 00:06 | #2 |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,162
|
What you're looking for is semaphores, as provided by exec.library.
Check out struct SignalSemaphore, ObtainSemaphore(), ObtainSemaphoreShared(), AttemptSemaphore(), AttemptSemaphoreShared() and ReleaseSemaphore(). (I wrote some threading code many years ago - I just remembered it's still online! Maybe it'll be helpful: http://blackfiveservices.co.uk/amiga...hreads_amr.lha ) |
28 October 2022, 00:07 | #3 |
Registered User
Join Date: Apr 2009
Location: N/A
Posts: 962
|
Thank you
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AGA Palette... how to implement | Steve | Coders. Asm / Hardware | 23 | 25 November 2018 22:26 |
Trying to implement joystick code in my stuff | Amiga1992 | Coders. General | 26 | 03 June 2018 23:03 |
implement others 68000 machines ? | turrican3 | support.WinUAE | 28 | 23 November 2017 00:54 |
Implement More Option For DirectDraw Mode. | Zilog | request.UAE Wishlist | 4 | 01 August 2014 09:18 |
Should I implement PM download now ? | RCK | project.EAB | 12 | 08 January 2002 01:21 |
|
|