mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Moved the signal semaphore allocation/initialization/deallocation
into a dedicated module. This also has the advantage that it's harder to break code by accidentally forgetting to call InitSemaphore() after having allocated the memory for it. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14853 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: stdio_openiob.c,v 1.10 2005-02-28 10:07:31 obarthel Exp $
|
||||
* $Id: stdio_openiob.c,v 1.11 2005-03-03 14:20:55 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -169,11 +169,9 @@ __open_iob(const char *filename, const char *mode, int file_descriptor, int slot
|
||||
{
|
||||
/* Allocate memory for an arbitration mechanism, then
|
||||
initialize it. */
|
||||
lock = AllocVec(sizeof(*lock),MEMF_ANY|MEMF_PUBLIC);
|
||||
lock = __create_semaphore();
|
||||
if(lock == NULL)
|
||||
goto out;
|
||||
|
||||
InitSemaphore(lock);
|
||||
}
|
||||
#else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user