1/* 2 * Copyright 2003-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7#include "libioP.h" 8 9 10#undef _IO_flockfile 11#undef _IO_funlockfile 12 13 14void 15_IO_flockfile(_IO_FILE *stream) 16{ 17 __libc_lock_lock_recursive(*stream->_lock); 18} 19 20 21void 22_IO_funlockfile(_IO_FILE *stream) 23{ 24 __libc_lock_unlock_recursive(*stream->_lock); 25} 26 27 28int 29_IO_ftrylockfile(_IO_FILE *stream) 30{ 31 // ToDo: that code has probably never been tested! 32 //return __libc_lock_trylock_recursive(*stream->_lock); 33 return 1; 34} 35 36weak_alias (_IO_flockfile, flockfile); 37weak_alias (_IO_funlockfile, funlockfile); 38weak_alias (_IO_ftrylockfile, ftrylockfile); 39