os_posix_thread.h
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 // This file is part of FZIs ic_workspace.
5 //
6 // This program is free software licensed under the LGPL
7 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
8 // You can find a copy of this license in LICENSE folder in the top
9 // directory of the source code.
10 //
11 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
12 //
13 // -- END LICENSE BLOCK ------------------------------------------------
14 
15 //----------------------------------------------------------------------
23 //----------------------------------------------------------------------
24 #ifndef ICL_CORE_OS_POSIX_THREAD_H_INCLUDED
25 #define ICL_CORE_OS_POSIX_THREAD_H_INCLUDED
26 
27 #include <pthread.h>
28 #include <unistd.h>
29 
30 #include "icl_core/ImportExport.h"
31 #include "BaseTypes.h"
32 
33 namespace icl_core {
34 namespace os {
35 namespace hidden_posix {
36 
37 struct ThreadId
38 {
39  pthread_t m_thread_id;
40 
41  ThreadId() : m_thread_id() {}
42  ThreadId(pthread_t thread_id) : m_thread_id(thread_id) {}
43 
44  operator size_t () const { return size_t(m_thread_id); }
45 };
46 ICL_CORE_IMPORT_EXPORT bool operator == (const ThreadId& left, const ThreadId& right);
47 
49 pid_t getpid();
50 
51 }
52 }
53 }
54 
55 #endif
#define ICL_CORE_IMPORT_EXPORT
Definition: ImportExport.h:42
bool operator==(const ThreadId &left, const ThreadId &right)
Contains import/export definitions for the Win32 plattform.
Contains Interface base classes and base types.


fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:58