win32-semaphore 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +4 -0
- data/README +1 -1
- data/lib/win32/semaphore.rb +8 -5
- data/test/test_win32_semaphore.rb +1 -1
- data/win32-semaphore.gemspec +1 -1
- metadata +2 -2
data/CHANGES
CHANGED
data/README
CHANGED
data/lib/win32/semaphore.rb
CHANGED
@@ -5,21 +5,24 @@ module Win32
|
|
5
5
|
|
6
6
|
# The Semaphore class encapsulates semaphore objects on Windows.
|
7
7
|
class Semaphore < Ipc
|
8
|
+
typedef :ulong, :dword
|
9
|
+
typedef :uintptr_t, :handle
|
10
|
+
|
8
11
|
ffi_lib :kernel32
|
9
12
|
|
10
13
|
private
|
11
14
|
|
12
15
|
class SecurityAttributes < FFI::Struct
|
13
16
|
layout(
|
14
|
-
:nLength, :
|
17
|
+
:nLength, :dword,
|
15
18
|
:lpSecurityDescriptor, :pointer,
|
16
19
|
:bInheritHandle, :bool
|
17
20
|
)
|
18
21
|
end
|
19
22
|
|
20
|
-
attach_function :CreateSemaphoreW, [:pointer, :long, :long, :buffer_in], :
|
21
|
-
attach_function :OpenSemaphoreW, [:
|
22
|
-
attach_function :ReleaseSemaphore, [:
|
23
|
+
attach_function :CreateSemaphoreW, [:pointer, :long, :long, :buffer_in], :handle
|
24
|
+
attach_function :OpenSemaphoreW, [:dword, :bool, :buffer_in], :handle
|
25
|
+
attach_function :ReleaseSemaphore, [:handle, :long, :pointer], :bool
|
23
26
|
|
24
27
|
private_class_method :CreateSemaphoreW, :OpenSemaphoreW, :ReleaseSemaphore
|
25
28
|
|
@@ -29,7 +32,7 @@ module Win32
|
|
29
32
|
public
|
30
33
|
|
31
34
|
# The version of the win32-semaphore library
|
32
|
-
VERSION = '0.4.
|
35
|
+
VERSION = '0.4.1'
|
33
36
|
|
34
37
|
# The initial count for the semaphore object. This value must be greater
|
35
38
|
# than or equal to zero and less than or equal to +max_count+. The state
|
data/win32-semaphore.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-semaphore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-04-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: win32-ipc
|