F´ Flight Software - C/C++ Documentation  NASA-v2.0.1
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TaskId.hpp
Go to the documentation of this file.
1 // File: TaskId.hpp
2 // Author: Ben Soudry (benjamin.s.soudry@jpl.nasa.gov)
3 // Nathan Serafin (nathan.serafin@jpl.nasa.gov)
4 // Date: 29 June, 2018
5 //
6 // Define a type for task IDs. This is useful as POSIX only
7 // provides an opaque TID with a special pthread_equal() comparison
8 // function. For higher-level code to not need to be aware of
9 // POSIX versus VxWorks versus whatever else, we can overload the
10 // == operator to perform the correct equality check.
11 
12 #ifndef _TaskId_hpp_
13 #define _TaskId_hpp_
14 
15 #include <Os/TaskIdRepr.hpp>
16 
17 namespace Os {
18  class TaskId {
19  public:
20  TaskId(void);
21  ~TaskId(void);
22  bool operator==(const TaskId& T) const;
23  bool operator!=(const TaskId& T) const;
24  TaskIdRepr getRepr(void) const;
25  private:
26  TaskIdRepr id;
27  };
28 }
29 
30 #endif
Os
Definition: File.cpp:7
Os::TaskId::~TaskId
~TaskId(void)
Definition: TaskId.cpp:20
Os::TaskId::getRepr
TaskIdRepr getRepr(void) const
Definition: TaskId.cpp:31
Os::TaskId::operator==
bool operator==(const TaskId &T) const
Definition: TaskId.cpp:23
Os::TaskId::TaskId
TaskId(void)
Definition: TaskId.cpp:16
Os::TaskId::operator!=
bool operator!=(const TaskId &T) const
Definition: TaskId.cpp:27
TaskIdRepr.hpp
Os::TaskId
Definition: TaskId.hpp:18