F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
TaskId.cpp
Go to the documentation of this file.
1 // File: TaskId.cpp
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 // POSIX implementation of TaskId type.
7 
8 extern "C" {
9 #include <pthread.h>
10 }
11 
12 #include <Os/TaskId.hpp>
13 
14 namespace Os
15 {
16  TaskId::TaskId() : id(pthread_self())
17  {
18  }
20  {
21  }
22  bool TaskId::operator==(const TaskId& T) const
23  {
24  return pthread_equal(id, T.id);
25  }
26  bool TaskId::operator!=(const TaskId& T) const
27  {
28  return !pthread_equal(id, T.id);
29  }
30  TaskIdRepr TaskId::getRepr() const
31  {
32  return this->id;
33  }
34 }
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