/[cvs]/joko/Uni/BSArch/02/bakery.h
ViewVC logotype

Contents of /joko/Uni/BSArch/02/bakery.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations)
Fri May 26 11:08:12 2006 UTC (18 years, 6 months ago) by joko
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +4 -1 lines
File MIME type: text/plain
+ My_InitializeCriticalSection
+ My_DeleteCriticalSection
+ various minor changes (Makefile, MAX_THREADS)

1
2 # ifndef __bakery_h
3 # define __bakery_h
4
5 #define MAX_THREADS 1000
6
7 /* Datenstruktur für einen kritischen Abschnitt */
8 typedef struct _crit_sec {
9 int choosing[MAX_THREADS];
10 int number[MAX_THREADS];
11 } *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 RSS 2.0 feed