
this PR close #124474 when calling `read` and `recv` function for a non-block file descriptor or a invalid file descriptor(`-1`), it will not cause block inside a critical section. this commit checks for non-block file descriptor assigned by `open` function with `O_NONBLOCK` flag. --------- Co-authored-by: Balazs Benics <benicsbalazs@gmail.com>
14 lines
205 B
C++
14 lines
205 B
C++
#pragma clang system_header
|
|
|
|
namespace std {
|
|
struct mutex {
|
|
void lock();
|
|
void unlock();
|
|
};
|
|
|
|
template <typename T> struct lock_guard {
|
|
lock_guard(std::mutex &);
|
|
~lock_guard();
|
|
};
|
|
} // namespace std
|