~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to rtl/darwin/pthread.inc

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2005-05-30 11:59:10 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050530115910-x5pbzm4qqta4i94h
Tags: 2.0.0-2
debian/fp-compiler.postinst.in: forgot to reapply the patch that
correctly creates the slave link to pc(1).  (Closes: #310907)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{
2
 
    $Id: pthread.inc,v 1.4 2004/05/28 18:23:55 marco Exp $
 
2
    $Id: pthread.inc,v 1.8 2005/04/09 20:29:15 marco Exp $
3
3
    This file is part of the Free Pascal run time library.
4
4
    Copyright (c) 1999-2000 by Peter Vreman
5
5
    member of the Free Pascal development team.
23
23
CONST PTHREAD_EXPLICIT_SCHED       = 0;
24
24
      PTHREAD_CREATE_DETACHED      = 1;
25
25
      PTHREAD_SCOPE_PROCESS        = 0;
26
 
      PTHREAD_MUTEX_RECURSIVE      = 2;
27
26
 
28
27
 TYPE
29
 
    pthread_t       = pointer;
30
 
    ppthread_t      = ^pthread_t;
31
 
    pthread_key_t   = cint;
32
 
    ppthread_key_t  = ^pthread_key_t;
33
 
    pthread_mutex_t = TRTLCriticalSection;
34
 
    ppthread_mutex_t= PRTLCriticalSection;
35
 
    pthread_attr_t  = pointer; // opague
36
 
    ppthread_attr_t = ^pthread_attr_t; // opague
37
 
    __destr_func_t  = procedure (p :pointer);cdecl;
38
 
    __startroutine_t= function (p :pointer):pointer;cdecl;
39
 
    pthread_mutex_attr_t  = pointer;
40
 
    ppthread_mutex_attr_t = ^pthread_mutex_t;
41
 
    ppthread_mutexattr_t  = ^pthread_mutex_t;
 
28
    ppthread_t           = ^pthread_t;
 
29
    ppthread_key_t       = ^pthread_key_t;
 
30
    ppthread_mutex_t     = ^pthread_mutex_t;
 
31
    ppthread_attr_t      = ^pthread_attr_t;
 
32
    __destr_func_t       = procedure (p :pointer);cdecl;
 
33
    __startroutine_t     = function (p :pointer):pointer;cdecl;
 
34
    ppthread_mutexattr_t = ^pthread_mutexattr_t;
 
35
    ppthread_cond_t      = ^pthread_cond_t;
 
36
    ppthread_condattr_t  = ^pthread_condattr_t;
42
37
 
43
 
    sem_t           = cint;
44
 
    psem_t          = ^sem_t;
45
 
   TSemaphore         = sem_t;
46
 
    PSemaphore         = ^TSemaphore;
 
38
    sem_t       = cint;
 
39
    psem_t          = ^sem_t;
 
40
    TSemaphore  = sem_t;
 
41
    PSemaphore  = ^TSemaphore;
47
42
 
48
43
function  pthread_getspecific      (t : pthread_key_t):pointer; cdecl; external 'c';
49
44
function  pthread_setspecific      (t : pthread_key_t;p:pointer):cint; cdecl; external 'c';
55
50
function  pthread_create ( p: ppthread_t;attr : ppthread_attr_t;f:__startroutine_t;arg:pointer):cint;cdecl;external 'c';
56
51
procedure pthread_exit  ( p: pointer); cdecl;external 'c';
57
52
function  pthread_self:cint; cdecl;external 'c';
58
 
function  pthread_mutex_init (p:ppthread_mutex_t;o:ppthread_mutex_attr_t):cint; cdecl;external 'c';
59
 
function  pthread_mutex_destroy (p:ppthread_mutex_attr_t):cint; cdecl;external 'c';
60
 
function  pthread_mutex_lock    (p:ppthread_mutex_attr_t):cint; cdecl;external 'c';
61
 
function  pthread_mutex_unlock  (p:ppthread_mutex_attr_t):cint; cdecl;external 'c';
 
53
function  pthread_mutex_init (p:ppthread_mutex_t;o:ppthread_mutexattr_t):cint; cdecl;external 'c';
 
54
function  pthread_mutex_destroy (p:ppthread_mutexattr_t):cint; cdecl;external 'c';
 
55
function  pthread_mutex_lock    (p:ppthread_mutexattr_t):cint; cdecl;external 'c';
 
56
function  pthread_mutex_unlock  (p:ppthread_mutexattr_t):cint; cdecl;external 'c';
62
57
function  pthread_cancel(_para1:pthread_t):cint;cdecl;external 'c';
63
58
function  pthread_detach(_para1:pthread_t):cint;cdecl;external 'c';
64
59
function  pthread_join(_para1:pthread_t; _para2:Ppointer):cint;cdecl;external 'c';
 
60
function  pthread_cond_destroy(_para1:Ppthread_cond_t):cint;cdecl;external 'c' name 'pthread_cond_destroy';
 
61
function  pthread_cond_init(_para1:Ppthread_cond_t;_para2:Ppthread_condattr_t):cint;cdecl;external  'c' name 'pthread_cond_init';
 
62
function  pthread_cond_signal(_para1:Ppthread_cond_t):cint;cdecl;external 'c' name 'pthread_cond_signal';
 
63
function  pthread_cond_wait(_para1:Ppthread_cond_t;_para2:Ppthread_mutex_t):cint;cdecl;external 'c' name 'pthread_cond_wait';
65
64
 
66
65
function sem_init(__sem:Psem_t; __pshared:cint;__value:cuint):cint;cdecl; external 'c' name 'sem_init';
67
66
function sem_destroy(__sem:Psem_t):cint;cdecl;external 'c' name 'sem_destroy';
76
75
function pthread_mutexattr_destroy(_para1:Ppthread_mutexattr_t):cint;cdecl;external 'c' name 'pthread_mutexattr_destroy';
77
76
function pthread_mutexattr_gettype(_para1:Ppthread_mutexattr_t; _para2:Pcint):cint;cdecl;external 'c' name 'pthread_mutexattr_gettype';
78
77
function pthread_mutexattr_settype(_para1:Ppthread_mutexattr_t; _para2:cint):cint;cdecl;external 'c' name 'pthread_mutexattr_settype';
 
78
function pthread_cond_timedwait(__cond:ppthread_cond_t; __mutex:ppthread_mutex_t; __abstime:ptimespec):cint; cdecl;external 'c' name 'pthread_cond_timedwait'; 
79
79
 
80
80
{
81
81
  $Log: pthread.inc,v $
82
 
  Revision 1.4  2004/05/28 18:23:55  marco
83
 
   * fixes for darwin specific external name '' behaviour. Must still be
84
 
  tested
85
 
 
86
 
  Revision 1.3  2004/05/26 20:05:21  marco
87
 
   * 2nd attempt
88
 
 
89
 
  Revision 1.2  2004/05/26 19:23:17  marco
90
 
   * first iteration
91
 
 
92
 
  Revision 1.1  2004/01/04 20:05:38  jonas
93
 
    * first working version of the Darwin/Mac OS X (for PowerPC) RTL
94
 
      Several non-essential units are still missing, but make cycle works
95
 
 
96
 
  Revision 1.2  2003/11/27 20:24:10  michael
97
 
  + Redefined ppthread_mutex_t
98
 
 
99
 
  Revision 1.1  2003/11/18 22:33:42  marco
100
 
   * moved from systhrds.pp
101
 
 
102
 
 
103
 
}
 
 
b'\\ No newline at end of file'
 
82
  Revision 1.8  2005/04/09 20:29:15  marco
 
83
    * added condtimedwait
 
84
 
 
85
  Revision 1.7  2005/02/14 17:13:21  peter
 
86
    * truncate log
 
87
 
 
88
}