ntdll: Make the fd cache section an uninterruptible section.
This commit is contained in:
parent
3410354d61
commit
735dbc406b
|
@ -558,13 +558,14 @@ int server_remove_fd_from_cache( obj_handle_t handle )
|
||||||
int server_get_unix_fd( obj_handle_t handle, unsigned int access, int *unix_fd,
|
int server_get_unix_fd( obj_handle_t handle, unsigned int access, int *unix_fd,
|
||||||
int *needs_close, enum server_fd_type *type, int *flags )
|
int *needs_close, enum server_fd_type *type, int *flags )
|
||||||
{
|
{
|
||||||
|
sigset_t sigset;
|
||||||
obj_handle_t fd_handle;
|
obj_handle_t fd_handle;
|
||||||
int ret = 0, removable = 0, fd;
|
int ret = 0, removable = 0, fd;
|
||||||
|
|
||||||
*unix_fd = -1;
|
*unix_fd = -1;
|
||||||
*needs_close = 0;
|
*needs_close = 0;
|
||||||
|
|
||||||
RtlEnterCriticalSection( &fd_cache_section );
|
server_enter_uninterrupted_section( &fd_cache_section, &sigset );
|
||||||
|
|
||||||
fd = get_cached_fd( handle, type );
|
fd = get_cached_fd( handle, type );
|
||||||
if (fd != -1 && !flags) goto done;
|
if (fd != -1 && !flags) goto done;
|
||||||
|
@ -593,7 +594,7 @@ int server_get_unix_fd( obj_handle_t handle, unsigned int access, int *unix_fd,
|
||||||
SERVER_END_REQ;
|
SERVER_END_REQ;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
RtlLeaveCriticalSection( &fd_cache_section );
|
server_leave_uninterrupted_section( &fd_cache_section, &sigset );
|
||||||
if (!ret) *unix_fd = fd;
|
if (!ret) *unix_fd = fd;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue