mirror of
https://github.com/fluencelabs/musl
synced 2025-06-24 20:21:59 +00:00
clean up handling of thread/nothread mode, locking
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user