diff options
Diffstat (limited to 'bits/stdio-lock.h')
-rw-r--r-- | bits/stdio-lock.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/bits/stdio-lock.h b/bits/stdio-lock.h index 198cb67535..3b29cf89db 100644 --- a/bits/stdio-lock.h +++ b/bits/stdio-lock.h @@ -46,12 +46,21 @@ __libc_lock_define_recursive (typedef, _IO_lock_t) #if defined _LIBC && !defined NOT_IN_libc # define _IO_acquire_lock(_fp) \ - _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \ - _IO_flockfile (_fp) + { \ + _IO_FILE *_IO_acquire_lock_file = _fp; \ + __libc_cleanup_region_start (1, (void (*) (void *)) _IO_acquire_lock_fct, &_IO_acquire_lock_file); \ + _IO_flockfile (_IO_acquire_lock_file) + +# define _IO_acquire_lock_clear_flags2(_fp) \ + { \ + _IO_FILE *_IO_acquire_lock_file = _fp; \ + __libc_cleanup_region_start (1, (void (*) (void *)) _IO_acquire_lock_clear_flags2_fct, &_IO_acquire_lock_file); \ + _IO_flockfile (_IO_acquire_lock_file) # define _IO_release_lock(_fp) \ - _IO_funlockfile (_fp); \ - _IO_cleanup_region_end (0) + __libc_cleanup_region_end (1); \ + } + #endif #endif /* bits/stdio-lock.h */ |