mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 06:49:27 +02:00
* Last patch was ok, problem was somewhere else. Moved *BSD part of pthreads to freebsd/pthreads.inc
This commit is contained in:
parent
bea886ca73
commit
d6081ef24c
@ -49,52 +49,12 @@ Uses BaseUnix,unix;
|
||||
{*****************************************************************************
|
||||
Generic overloaded
|
||||
*****************************************************************************}
|
||||
{$i ostypes.inc}
|
||||
{$i ossysch.inc}
|
||||
|
||||
{ Include generic overloaded routines }
|
||||
{$i thread.inc}
|
||||
|
||||
{$ifndef BSD}
|
||||
{ Include OS specific parts.
|
||||
{$i pthread.inc}
|
||||
{$else}
|
||||
{$i ptypes.inc}
|
||||
|
||||
CONST PTHREAD_EXPLICIT_SCHED = 0;
|
||||
PTHREAD_CREATE_DETACHED = 1;
|
||||
PTHREAD_SCOPE_PROCESS = 0;
|
||||
|
||||
TYPE
|
||||
pthread_t = pointer;
|
||||
ppthread_t = ^pthread_t;
|
||||
pthread_key_t = cint;
|
||||
ppthread_key_t = ^pthread_key_t;
|
||||
pthread_mutex_t = pointer;
|
||||
ppthread_mutex_t= ^pthread_mutex_t;
|
||||
pthread_attr_t = pointer; // opague
|
||||
ppthread_attr_t = ^pthread_attr_t; // opague
|
||||
__destr_func_t = procedure (p :pointer);cdecl;
|
||||
__startroutine_t= function (p :pointer):pointer;cdecl;
|
||||
pthread_mutex_attr_t = pointer;
|
||||
ppthread_mutex_attr_t = ^pthread_mutex_t;
|
||||
|
||||
function pthread_getspecific (t : pthread_key_t):pointer; cdecl; external;
|
||||
function pthread_setspecific (t : pthread_key_t;p:pointer):cint; cdecl; external;
|
||||
function pthread_key_create (p : ppthread_key_t;f: __destr_func_t):cint; cdecl;external;
|
||||
function pthread_attr_init (p : ppthread_key_t):cint; cdecl; external;
|
||||
function pthread_attr_setinheritsched(p : ppthread_attr_t;i:cint):cint; cdecl; external;
|
||||
function pthread_attr_setscope (p : ppthread_attr_t;i:cint):cint;cdecl;external;
|
||||
function pthread_attr_setdetachstate (p : ppthread_attr_t;i:cint):cint;cdecl;external;
|
||||
function pthread_create ( p: ppthread_t;attr : ppthread_attr_t;f:__startroutine_t;arg:pointer):cint;cdecl;external;
|
||||
procedure pthread_exit ( p: pointer); cdecl;external;
|
||||
function pthread_self:cint; cdecl;external;
|
||||
function pthread_mutex_init (p:ppthread_mutex_t;o:ppthread_mutex_attr_t):cint; cdecl;external;
|
||||
function pthread_mutex_destroy (p:ppthread_mutex_attr_t):cint; cdecl;external;
|
||||
function pthread_mutex_lock (p:ppthread_mutex_attr_t):cint; cdecl;external;
|
||||
function pthread_mutex_unlock (p:ppthread_mutex_attr_t):cint; cdecl;external;
|
||||
function pthread_cancel(_para1:pthread_t):cint;cdecl;external;
|
||||
function pthread_detach(_para1:pthread_t):cint;cdecl;external;
|
||||
function pthread_join(_para1:pthread_t; _para2:Ppointer):cint;cdecl;external;
|
||||
{$endif}
|
||||
|
||||
{*****************************************************************************
|
||||
System dependent memory allocation
|
||||
@ -420,7 +380,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.17 2003-11-17 10:05:51 marco
|
||||
Revision 1.18 2003-11-18 22:35:09 marco
|
||||
* Last patch was ok, problem was somewhere else. Moved *BSD part of pthreads to freebsd/pthreads.inc
|
||||
|
||||
Revision 1.17 2003/11/17 10:05:51 marco
|
||||
* threads for FreeBSD. Not working tho
|
||||
|
||||
Revision 1.16 2003/11/17 08:27:50 marco
|
||||
|
Loading…
Reference in New Issue
Block a user