Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:37

0001 // Created on: 2006-03-10
0002 // Created by: data exchange team
0003 // Copyright (c) 2006-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef OSD_ThreadFunction_HeaderFile
0017 #define OSD_ThreadFunction_HeaderFile
0018 
0019 
0020 //! Typedef for prototype of function to be used as main function of a thread.
0021 //!
0022 //! Note: currently we use the same prototype for thread functions on all platforms,
0023 //! in order to make user programs less platform-dependent.
0024 //! However, there is a distinction in returned value for the thread function
0025 //! on UNIX/Linux (void*) and Windows (DWORD) systems.
0026 //! Thus on Windows we have to encode returned void* as DWORD.
0027 //! It is OK for WIN32, but potentially problem on WIN64.
0028 //! To avoid any problems with this, for better application portability it is recommended
0029 //! that the thread function returns just integer (casted to void*).
0030 //! This shall work on all platforms.
0031 typedef Standard_Address (*OSD_ThreadFunction) (Standard_Address data);
0032 
0033 //#ifdef _WIN32
0034 //typedef LPTHREAD_START_ROUTINE OSD_ThreadFunction;
0035 //#endif
0036 
0037 #endif