1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- Extended the thread-safety locking to the file descriptors.

git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14844 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-02-28 13:22:53 +00:00
parent 1df294c07e
commit c799b17bb9
25 changed files with 282 additions and 52 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: socket_hook_entry.c,v 1.9 2005-02-20 15:46:52 obarthel Exp $
* $Id: socket_hook_entry.c,v 1.10 2005-02-28 13:22:53 obarthel Exp $
*
* :ts=4
*
@ -56,6 +56,8 @@ __socket_hook_entry(
assert( fam != NULL && fd != NULL );
__fd_lock(fd);
switch(fam->fam_Action)
{
case file_action_read:
@ -120,6 +122,11 @@ __socket_hook_entry(
}
}
__fd_unlock(fd);
/* Free the lock semaphore now. */
FreeVec(fd->fd_Lock);
/* And that's the last for this file descriptor. */
memset(fd,0,sizeof(*fd));
@ -190,6 +197,8 @@ __socket_hook_entry(
break;
}
__fd_unlock(fd);
RETURN(result);
return(result);
}