On mach, allow other ruby green threads to continue during semaphore wait

This commit is contained in:
Marc Siegel committed 2013-12-26 12:27:36 -05:00
1 parent 4906f5acf5
commit d1644104c8
2 files changed
+24 -3

No files matched your search

+4 -3
View File
@@ -72,8 +72,8 @@ module Mach
# Attach a function as with +attach_function+, but check the
# return value and raise an exception on errors.
def self.attach_mach_function(sym, argtypes, rettype)
attach_function(sym, argtypes, rettype)
def self.attach_mach_function(sym, argtypes, rettype, options = nil)
attach_function(sym, argtypes, rettype, options)
error_check(sym)
end
@@ -208,7 +208,8 @@ module Mach
:kern_return_t)
attach_mach_function(:semaphore_wait,
[:semaphore_t],
:kern_return_t)
:kern_return_t,
:blocking => true)
attach_mach_function(:semaphore_timedwait,
[:semaphore_t, TimeSpec.val],
:kern_return_t)