clean up handling of thread/nothread mode, locking
This commit is contained in:
parent
eb0e8fa0b1
commit
9080cc153c
8 changed files with 16 additions and 27 deletions
|
|
@ -3,9 +3,6 @@
|
|||
|
||||
void flockfile(FILE *f)
|
||||
{
|
||||
if (!libc.lockfile) {
|
||||
pthread_self();
|
||||
libc.lockfile = __lockfile;
|
||||
}
|
||||
if (!libc.threaded) pthread_self();
|
||||
__lockfile(f);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
int ftrylockfile(FILE *f)
|
||||
{
|
||||
int tid = pthread_self()->tid;
|
||||
if (!libc.lockfile) libc.lockfile = __lockfile;
|
||||
if (f->lock == tid) {
|
||||
if (f->lockcount == INT_MAX)
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue