F´ Flight Software - C/C++ Documentation devel
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
17namespace Os {
18 class TaskId {
19 public:
20 TaskId();
21 ~TaskId();
22 bool operator==(const TaskId& T) const;
23 bool operator!=(const TaskId& T) const;
24 TaskIdRepr getRepr() const;
25 private:
26 TaskIdRepr id;
27 };
28}
29
30#endif
TaskIdRepr getRepr() const
Definition TaskId.cpp:30
bool operator==(const TaskId &T) const
Definition TaskId.cpp:22
bool operator!=(const TaskId &T) const
Definition TaskId.cpp:26
Definition File.cpp:6