mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
Make recv block only the calling thread, not the entire process.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@451
This commit is contained in:
parent
7437ce425c
commit
c489fb0318
@ -1689,6 +1689,8 @@ int __libc_recv(int s, void *buf, size_t len, int flags);
|
||||
__attribute__((weak))
|
||||
int recv(int s, void *buf, size_t len, int flags)
|
||||
{
|
||||
__my_pthread_testcancel();
|
||||
wait_for_fd_to_be_readable_or_erring(s);
|
||||
__my_pthread_testcancel();
|
||||
return __libc_recv(s, buf, len, flags);
|
||||
}
|
||||
|
||||
@ -1689,6 +1689,8 @@ int __libc_recv(int s, void *buf, size_t len, int flags);
|
||||
__attribute__((weak))
|
||||
int recv(int s, void *buf, size_t len, int flags)
|
||||
{
|
||||
__my_pthread_testcancel();
|
||||
wait_for_fd_to_be_readable_or_erring(s);
|
||||
__my_pthread_testcancel();
|
||||
return __libc_recv(s, buf, len, flags);
|
||||
}
|
||||
|
||||
@ -1689,6 +1689,8 @@ int __libc_recv(int s, void *buf, size_t len, int flags);
|
||||
__attribute__((weak))
|
||||
int recv(int s, void *buf, size_t len, int flags)
|
||||
{
|
||||
__my_pthread_testcancel();
|
||||
wait_for_fd_to_be_readable_or_erring(s);
|
||||
__my_pthread_testcancel();
|
||||
return __libc_recv(s, buf, len, flags);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user