equal
deleted
inserted
replaced
9 other person. No title to or ownership of the software is |
9 other person. No title to or ownership of the software is |
10 hereby transferred. |
10 hereby transferred. |
11 " |
11 " |
12 |
12 |
13 |
13 |
14 'From Smalltalk/X, Version:2.10.5 on 28-apr-1995 at 12:37:45 pm'! |
|
15 |
|
16 Object subclass:#RecursionLock |
14 Object subclass:#RecursionLock |
17 instanceVariableNames:'process sema' |
15 instanceVariableNames:'process sema' |
18 classVariableNames:'' |
16 classVariableNames:'' |
19 poolDictionaries:'' |
17 poolDictionaries:'' |
20 category:'Kernel-Processes' |
18 category:'Kernel-Processes' |
21 ! |
19 ! |
22 |
20 |
23 !RecursionLock class methodsFor:'documentation'! |
21 !RecursionLock class methodsFor:'documentation'! |
|
22 |
|
23 copyright |
|
24 " |
|
25 COPYRIGHT (c) 1995 by Claus Gittinger |
|
26 All Rights Reserved |
|
27 |
|
28 This software is furnished under a license and may be used |
|
29 only in accordance with the terms of that license and with the |
|
30 inclusion of the above copyright notice. This software may not |
|
31 be provided or otherwise made available to, or used by, any |
|
32 other person. No title to or ownership of the software is |
|
33 hereby transferred. |
|
34 " |
|
35 |
|
36 ! |
24 |
37 |
25 documentation |
38 documentation |
26 " |
39 " |
27 like a Semaphore for mutual exclusion, but avoids the deadlock |
40 like a Semaphore for mutual exclusion, but avoids the deadlock |
28 if a critical region is reentered by the same process again. |
41 if a critical region is reentered by the same process again. |
40 Transcript showCr:'again ...' |
53 Transcript showCr:'again ...' |
41 ] |
54 ] |
42 ] |
55 ] |
43 " |
56 " |
44 |
57 |
45 ! |
|
46 |
|
47 copyright |
|
48 " |
|
49 COPYRIGHT (c) 1995 by Claus Gittinger |
|
50 All Rights Reserved |
|
51 |
|
52 This software is furnished under a license and may be used |
|
53 only in accordance with the terms of that license and with the |
|
54 inclusion of the above copyright notice. This software may not |
|
55 be provided or otherwise made available to, or used by, any |
|
56 other person. No title to or ownership of the software is |
|
57 hereby transferred. |
|
58 " |
|
59 |
|
60 ! |
|
61 |
|
62 version |
|
63 ^ '$Header: /cvs/stx/stx/libbasic/RecursionLock.st,v 1.5 1995-11-11 15:21:35 cg Exp $' |
|
64 ! ! |
58 ! ! |
65 |
59 |
66 !RecursionLock class methodsFor:'instance creation'! |
60 !RecursionLock class methodsFor:'instance creation'! |
67 |
61 |
68 new |
62 new |
69 ^ self basicNew initialize |
63 ^ self basicNew initialize |
70 |
64 |
|
65 ! ! |
|
66 |
|
67 !RecursionLock methodsFor:'private initialization'! |
|
68 |
|
69 initialize |
|
70 sema := Semaphore forMutualExclusion |
71 ! ! |
71 ! ! |
72 |
72 |
73 !RecursionLock methodsFor:'wait & signal'! |
73 !RecursionLock methodsFor:'wait & signal'! |
74 |
74 |
75 critical:aBlock |
75 critical:aBlock |
91 process := nil |
91 process := nil |
92 ] |
92 ] |
93 ]. |
93 ]. |
94 ! ! |
94 ! ! |
95 |
95 |
96 !RecursionLock methodsFor:'private initialization'! |
96 !RecursionLock class methodsFor:'documentation'! |
97 |
97 |
98 initialize |
98 version |
99 sema := Semaphore forMutualExclusion |
99 ^ '$Header: /cvs/stx/stx/libbasic/RecursionLock.st,v 1.6 1995-12-07 21:30:23 cg Exp $' |
100 ! ! |
100 ! ! |