forked from Bananymous/banan-os
				
			Kernel: Support pselect sigmask
This commit is contained in:
		
							parent
							
								
									7c57d736c6
								
							
						
					
					
						commit
						5938cc4086
					
				|  | @ -1379,8 +1379,10 @@ namespace Kernel | ||||||
| 		if (arguments->sigmask) | 		if (arguments->sigmask) | ||||||
| 			TRY(validate_pointer_access(arguments->sigmask, sizeof(sigset_t), false)); | 			TRY(validate_pointer_access(arguments->sigmask, sizeof(sigset_t), false)); | ||||||
| 
 | 
 | ||||||
|  | 		const auto old_sigmask = Thread::current().m_signal_block_mask; | ||||||
| 		if (arguments->sigmask) | 		if (arguments->sigmask) | ||||||
| 			return BAN::Error::from_errno(ENOTSUP); | 			Thread::current().m_signal_block_mask = *arguments->sigmask; | ||||||
|  | 		BAN::ScopeGuard sigmask_restore([old_sigmask] { Thread::current().m_signal_block_mask = old_sigmask; }); | ||||||
| 
 | 
 | ||||||
| 		uint64_t timedout_ns = SystemTimer::get().ns_since_boot(); | 		uint64_t timedout_ns = SystemTimer::get().ns_since_boot(); | ||||||
| 		if (arguments->timeout) | 		if (arguments->timeout) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue