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

- The thread-safe version of isatty() should now work for stdio

file descriptors, too.

- Retrofitted thread-safety into the termios code.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15010 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-07-06 18:48:53 +00:00
parent cd7b02f4d7
commit 882875d79a
22 changed files with 575 additions and 50 deletions

View File

@@ -1,5 +1,5 @@
/*
* $Id: unistd_fdatasync.c,v 1.6 2005-04-24 08:46:37 obarthel Exp $
* $Id: unistd_fdatasync.c,v 1.7 2005-07-06 18:48:53 obarthel Exp $
*
* :ts=4
*
@@ -64,6 +64,8 @@ fdatasync(int file_descriptor)
assert( __fd[file_descriptor] != NULL );
assert( FLAG_IS_SET(__fd[file_descriptor]->fd_Flags,FDF_IN_USE) );
__stdio_lock();
fd = __get_file_descriptor(file_descriptor);
if(fd == NULL)
{
@@ -71,6 +73,8 @@ fdatasync(int file_descriptor)
goto out;
}
__fd_lock(fd);
if(__sync_fd(fd,0) < 0) /* flush just the data */
goto out;
@@ -78,6 +82,10 @@ fdatasync(int file_descriptor)
out:
__fd_unlock(fd);
__stdio_unlock();
RETURN(result);
return(result);
}