0022972: Eliminate macro definitions that has compiler-provided analogs (WNT and...
[occt.git] / src / OSD / OSD_ThreadFunction.hxx
CommitLineData
b311480e 1// Created on: 2006-03-10
2// Created by: data exchange team
973c2be1 3// Copyright (c) 2006-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
16#ifndef OSD_ThreadFunction_HeaderFile
17#define OSD_ThreadFunction_HeaderFile
18
19#include <Standard_Address.hxx>
20
21// Typedef for prototype of function to be used as main
22// function of a thread
23
24// Note: currently we use the same prototype for thread functions on all
25// platforms, in order to make user programs less platform-dependent.
26// However, there is a distinction in returned value for the thread function
27// on UNIX/Linux (void*) and WIndows (DWORD) systems.
28// Thus on Windows we have to encode returned void* as DWORD. It is OK for WIN32,
29// but potentially problem on WIN64.
30// To avoid any problems with this, for better application portability it is recomended
31// that the thread function returns just integer (casted to void*).
32// This shall work on all platforms.
33
57c28b61 34//#ifdef _WIN32
7fd59977 35//#include <windows.h>
36//typedef LPTHREAD_START_ROUTINE OSD_ThreadFunction;
37//#else
38
39typedef Standard_Address (*OSD_ThreadFunction) (Standard_Address data);
40
41//#endif
42
43#endif