mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 18:29:09 +02:00
* Try to implement real pmutext, not yet working
git-svn-id: trunk@20295 -
This commit is contained in:
parent
f106f0e30c
commit
b72b38fdaa
@ -14,5 +14,40 @@
|
|||||||
|
|
||||||
{ definition of pthread_mutex_t, because needed in both ptypes.inc and }
|
{ definition of pthread_mutex_t, because needed in both ptypes.inc and }
|
||||||
{ in sysosh.inc }
|
{ in sysosh.inc }
|
||||||
|
(* from /usr/include/pthread_types.h
|
||||||
|
struct __pthread_mutex_st {
|
||||||
|
unsigned int ptm_magic;
|
||||||
|
pthread_spin_t ptm_errorcheck;
|
||||||
|
#ifdef __CPU_SIMPLE_LOCK_PAD
|
||||||
|
uint8_t ptm_pad1[3];
|
||||||
|
#endif
|
||||||
|
pthread_spin_t ptm_interlock; /* unused - backwards compat */
|
||||||
|
#ifdef __CPU_SIMPLE_LOCK_PAD
|
||||||
|
uint8_t ptm_pad2[3];
|
||||||
|
#endif
|
||||||
|
volatile pthread_t ptm_owner;
|
||||||
|
pthread_t * volatile ptm_waiters;
|
||||||
|
unsigned int ptm_recursed;
|
||||||
|
void *ptm_spare2; /* unused - backwards compat */
|
||||||
|
};
|
||||||
|
*)
|
||||||
|
|
||||||
|
{$ifdef I386}
|
||||||
|
{$define __CPU_SIMPLE_LOCK_PAD}
|
||||||
|
{$endif}
|
||||||
|
record
|
||||||
|
ptm_magic : dword { should be cuint};
|
||||||
|
ptm_errorcheck : char { should be pthread_spin_t};
|
||||||
|
{$ifdef __CPU_SIMPLE_LOCK_PAD}
|
||||||
|
ptm_pad : array[0..2] of char;
|
||||||
|
{$endif _CPU_SIMPLE_LOCK_PAD}
|
||||||
|
ptm_interlock : char { should be pthread_spinn_t};
|
||||||
|
{$ifdef __CPU_SIMPLE_LOCK_PAD}
|
||||||
|
ptm_pad2 : array[0..2] of char;
|
||||||
|
{$endif _CPU_SIMPLE_LOCK_PAD}
|
||||||
|
ptm_owner : pointer { should be pthread_t};
|
||||||
|
ptm_waiter : pointer { should be ppthread_t};
|
||||||
|
ptm_recursed : dword { should be cuint};
|
||||||
|
ptm_spare2 : pointer;
|
||||||
|
end;
|
||||||
|
|
||||||
pointer;
|
|
||||||
|
Loading…
Reference in New Issue
Block a user