Parent Directory | Revision Log
+ My_InitializeCriticalSection + My_DeleteCriticalSection + various minor changes (Makefile, MAX_THREADS)
1 | joko | 1.1 | |
2 | # ifndef __bakery_h | ||
3 | # define __bakery_h | ||
4 | |||
5 | joko | 1.3 | #define MAX_THREADS 1000 |
6 | |||
7 | joko | 1.1 | /* Datenstruktur für einen kritischen Abschnitt */ |
8 | typedef struct _crit_sec { | ||
9 | joko | 1.3 | int choosing[MAX_THREADS]; |
10 | int number[MAX_THREADS]; | ||
11 | joko | 1.1 | } *MY_LPCRITICAL_SECTION; |
12 | |||
13 | void My_InitializeCriticalSection( MY_LPCRITICAL_SECTION * sec ); | ||
14 | void My_DeleteCriticalSection( MY_LPCRITICAL_SECTION sec ); | ||
15 | |||
16 | /* ThId = thread id */ | ||
17 | void My_EnterCriticalSection( int ThId, MY_LPCRITICAL_SECTION sec ); | ||
18 | void My_LeaveCriticalSection( int ThId, MY_LPCRITICAL_SECTION sec ); | ||
19 | |||
20 | # endif | ||
21 |
MailToCvsAdmin">MailToCvsAdmin | ViewVC Help |
Powered by ViewVC 1.1.26 |