Browse Source

* checksynchronize now in interface win32 uses the default impl.
unix uses systhrds, rest empty implementation.

marco 20 years ago
parent
commit
cb75ebda02
3 changed files with 37 additions and 4 deletions
  1. 21 1
      rtl/inc/thread.inc
  2. 10 1
      rtl/inc/threadh.inc
  3. 6 2
      rtl/unix/cthreads.pp

+ 21 - 1
rtl/inc/thread.inc

@@ -260,6 +260,12 @@ begin
   currenttm.rtleventsync(m,p);
   currenttm.rtleventsync(m,p);
 end;
 end;
 
 
+procedure RTLchecksynchronize;
+
+begin
+ currenttm.rtlchksyncunix;
+end;
+
 
 
 { ---------------------------------------------------------------------
 { ---------------------------------------------------------------------
     ThreadManager which gives run-time error. Use if no thread support.
     ThreadManager which gives run-time error. Use if no thread support.
@@ -416,6 +422,15 @@ begin
 end;
 end;
 
 
 
 
+procedure NORTLChkSyncUnix;
+
+begin
+  NoThreadError;
+end;
+
+
+
+
 Var
 Var
   NoThreadManager : TThreadManager;
   NoThreadManager : TThreadManager;
 
 
@@ -454,6 +469,7 @@ begin
     rtleventSetEvent       :=@NortleventSetEvent;
     rtleventSetEvent       :=@NortleventSetEvent;
     rtleventWaitFor        :=@NortleventWaitFor;
     rtleventWaitFor        :=@NortleventWaitFor;
     rtleventsync	   :=@Nortleventsync;
     rtleventsync	   :=@Nortleventsync;
+    rtlchksyncunix	   :=@nortlchksyncunix;
     end;
     end;
   SetThreadManager(NoThreadManager);
   SetThreadManager(NoThreadManager);
 end;
 end;
@@ -461,7 +477,11 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.15  2004-12-23 20:58:22  peter
+  Revision 1.16  2004-12-27 15:28:40  marco
+   * checksynchronize now in interface win32 uses the default impl.
+       unix uses systhrds, rest empty implementation.
+
+  Revision 1.15  2004/12/23 20:58:22  peter
     * fix rtlcreateevent
     * fix rtlcreateevent
 
 
   Revision 1.14  2004/12/23 15:08:58  marco
   Revision 1.14  2004/12/23 15:08:58  marco

+ 10 - 1
rtl/inc/threadh.inc

@@ -46,6 +46,8 @@ type
   TRTLEventHandler	    = procedure(AEvent:PRTLEvent);
   TRTLEventHandler	    = procedure(AEvent:PRTLEvent);
   TRTLCreateEventHandler    = function:PRTLEvent;	
   TRTLCreateEventHandler    = function:PRTLEvent;	
   TRTLEventSyncHandler	    = procedure (m:trtlmethod;p:tprocedure);
   TRTLEventSyncHandler	    = procedure (m:trtlmethod;p:tprocedure);
+  TRTLCheckSyncUnixHandler  = procedure;
+
   // TThreadManager interface.
   // TThreadManager interface.
   TThreadManager = Record
   TThreadManager = Record
     InitManager            : Function : Boolean;
     InitManager            : Function : Boolean;
@@ -78,6 +80,7 @@ type
     RTLEventSetEvent       : TRTLEventHandler;
     RTLEventSetEvent       : TRTLEventHandler;
     RTLeventWaitFOr	   : TRTLEventHandler;
     RTLeventWaitFOr	   : TRTLEventHandler;
     RTLEventSync	   : TRTLEventSyncHandler;
     RTLEventSync	   : TRTLEventSyncHandler;
+    RTLChkSyncUnix	   : TRTLCheckSyncUnixHandler;
   end;
   end;
 
 
 {*****************************************************************************
 {*****************************************************************************
@@ -157,9 +160,15 @@ procedure RTLeventdestroy(state:pRTLEvent);
 procedure RTLeventSetEvent(state:pRTLEvent);
 procedure RTLeventSetEvent(state:pRTLEvent);
 procedure RTLeventWaitFor(state:pRTLEvent);
 procedure RTLeventWaitFor(state:pRTLEvent);
 procedure RTLeventsync(m:trtlmethod;p:tprocedure);
 procedure RTLeventsync(m:trtlmethod;p:tprocedure);
+procedure RTLchecksynchronize;
+
 {
 {
   $Log$
   $Log$
-  Revision 1.22  2004-12-23 15:08:58  marco
+  Revision 1.23  2004-12-27 15:28:40  marco
+   * checksynchronize now in interface win32 uses the default impl.
+       unix uses systhrds, rest empty implementation.
+
+  Revision 1.22  2004/12/23 15:08:58  marco
    * 2nd synchronize attempt. cthreads<->systhrds difference was not ok, but
    * 2nd synchronize attempt. cthreads<->systhrds difference was not ok, but
      only showed on make install should be fixed now.
      only showed on make install should be fixed now.
 
 

+ 6 - 2
rtl/unix/cthreads.pp

@@ -557,7 +557,6 @@ procedure CheckSynchronize;
 begin
 begin
   if SynchronizeMethod = nil then
   if SynchronizeMethod = nil then
     exit;
     exit;
-
   try
   try
     SynchronizeMethod;
     SynchronizeMethod;
   except
   except
@@ -661,6 +660,7 @@ begin
     rtlEventSetEvent       :=@intrtlEventSetEvent;
     rtlEventSetEvent       :=@intrtlEventSetEvent;
     rtleventWaitFor        :=@intrtleventWaitFor;
     rtleventWaitFor        :=@intrtleventWaitFor;
     rtleventsync           :=trtleventsynchandler(@intrtleventsync);
     rtleventsync           :=trtleventsynchandler(@intrtleventsync);
+    rtlchksyncunix	   :=@checksynchronize;
     end;
     end;
   SetThreadManager(CThreadManager);
   SetThreadManager(CThreadManager);
   InitHeapMutexes;
   InitHeapMutexes;
@@ -673,7 +673,11 @@ finalization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.17  2004-12-23 20:20:30  michael
+  Revision 1.18  2004-12-27 15:28:40  marco
+   * checksynchronize now in interface win32 uses the default impl.
+       unix uses systhrds, rest empty implementation.
+
+  Revision 1.17  2004/12/23 20:20:30  michael
   + Fixed tmt1 test bug
   + Fixed tmt1 test bug
 
 
   Revision 1.16  2004/12/23 15:08:59  marco
   Revision 1.16  2004/12/23 15:08:59  marco