瀏覽代碼

* start exchanging untyped "Pointer" handle types to pointer to empty records.
see discussion mantis 16607

git-svn-id: trunk@15404 -

marco 15 年之前
父節點
當前提交
5fac78e334
共有 2 個文件被更改,包括 18 次插入8 次删除
  1. 2 1
      rtl/bsd/sysosh.inc
  2. 16 7
      rtl/freebsd/ptypes.inc

+ 2 - 1
rtl/bsd/sysosh.inc

@@ -19,7 +19,8 @@
 type
 type
   { fd are int in C also for 64bit targets (x86_64) }
   { fd are int in C also for 64bit targets (x86_64) }
   THandle = Longint;
   THandle = Longint;
-  TThreadID = pointer;
+  TThreadRec = record end;
+  TThreadID  = ^TThreadRec;
   
   
   { pthread_mutex_t }
   { pthread_mutex_t }
   PRTLCriticalSection = ^TRTLCriticalSection;
   PRTLCriticalSection = ^TRTLCriticalSection;

+ 16 - 7
rtl/freebsd/ptypes.inc

@@ -117,15 +117,24 @@ type
   ptimespec= ^timespec;
   ptimespec= ^timespec;
   Ttimespec= timespec;
   Ttimespec= timespec;
 
 
-   pthread_t            = pointer;
-   pthread_attr_t       = pointer;
+   pthread_t_rec        = record end;
+   pthread_attr_t_rec   = record end;
+//   pthread_mutex_t_rec   = record end;
+   pthread_mutexattr_t_rec   = record end;
+   pthread_cond_t_rec   = record end;
+   pthread_condattr_t_rec   = record end;
+   pthread_rwlock_t_rec   = record end;
+   pthread_rwlockattr_t_rec   = record end;
+
+   pthread_t            = ^pthread_t_rec;
+   pthread_attr_t       = ^pthread_attr_t_rec;
    pthread_mutex_t      = {$i pmutext.inc}
    pthread_mutex_t      = {$i pmutext.inc}
-   pthread_mutexattr_t  = pointer;
-   pthread_cond_t       = pointer;
-   pthread_condattr_t   = pointer;
+   pthread_mutexattr_t  = ^pthread_mutexattr_t_rec;
+   pthread_cond_t       = ^pthread_cond_t_rec;
+   pthread_condattr_t   = ^pthread_condattr_t_rec;
    pthread_key_t        = cint;
    pthread_key_t        = cint;
-   pthread_rwlock_t     = pointer;
-   pthread_rwlockattr_t = pointer;
+   pthread_rwlock_t     = ^pthread_rwlock_t_rec;
+   pthread_rwlockattr_t = ^pthread_rwlock_t_rec;
 
 
    sem_t                = pointer;
    sem_t                = pointer;
    rlim_t		= int64;
    rlim_t		= int64;