Commit 0e570674 by Marcus Winter

mtapi_cpp: added missing concurrency tags

parent ce2cf1fa
...@@ -105,6 +105,7 @@ class Action { ...@@ -105,6 +105,7 @@ class Action {
* Allows for interoperability with the C interface. * Allows for interoperability with the C interface.
* *
* \returns The internal mtapi_action_hndl_t. * \returns The internal mtapi_action_hndl_t.
* \waitfree
*/ */
mtapi_action_hndl_t GetInternal() const { mtapi_action_hndl_t GetInternal() const {
return handle_; return handle_;
......
...@@ -105,6 +105,7 @@ public: ...@@ -105,6 +105,7 @@ public:
* Allows for interoperability with the C interface. * Allows for interoperability with the C interface.
* *
* \returns A reference to the internal mtapi_action_attributes_t structure. * \returns A reference to the internal mtapi_action_attributes_t structure.
* \waitfree
*/ */
mtapi_action_attributes_t const & GetInternal() const { mtapi_action_attributes_t const & GetInternal() const {
return attributes_; return attributes_;
......
...@@ -81,6 +81,8 @@ public: ...@@ -81,6 +81,8 @@ public:
* Initializes an Affinity object with the given initial affinity. * Initializes an Affinity object with the given initial affinity.
* If \c initial_affinity is \c true the Affinity will map to all worker * If \c initial_affinity is \c true the Affinity will map to all worker
* threads, otherwise it will map to no worker threads. * threads, otherwise it will map to no worker threads.
*
* \notthreadsafe
*/ */
void Init( void Init(
bool initial_affinity /**< The initial affinity to set. */ bool initial_affinity /**< The initial affinity to set. */
...@@ -93,6 +95,8 @@ public: ...@@ -93,6 +95,8 @@ public:
/** /**
* Sets affinity to the given worker. * Sets affinity to the given worker.
*
* \notthreadsafe
*/ */
void Set( void Set(
mtapi_uint_t worker, /**< The worker to set affinity to. */ mtapi_uint_t worker, /**< The worker to set affinity to. */
...@@ -108,6 +112,7 @@ public: ...@@ -108,6 +112,7 @@ public:
* Gets affinity to the given worker. * Gets affinity to the given worker.
* *
* \returns \c true, if the Affinity maps to the worker, \c false otherwise. * \returns \c true, if the Affinity maps to the worker, \c false otherwise.
* \waitfree
*/ */
bool Get( bool Get(
mtapi_uint_t worker /**< The worker to get affinity of. */ mtapi_uint_t worker /**< The worker to get affinity of. */
...@@ -124,6 +129,7 @@ public: ...@@ -124,6 +129,7 @@ public:
* Allows for interoperability with the C interface. * Allows for interoperability with the C interface.
* *
* \returns The internal mtapi_affinity_t. * \returns The internal mtapi_affinity_t.
* \waitfree
*/ */
mtapi_affinity_t GetInternal() const { mtapi_affinity_t GetInternal() const {
return affinity_; return affinity_;
......
...@@ -102,6 +102,7 @@ class Group { ...@@ -102,6 +102,7 @@ class Group {
* Starts a new Task in this Group. * Starts a new Task in this Group.
* *
* \returns The handle to the started Task. * \returns The handle to the started Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Start( Task Start(
...@@ -122,6 +123,7 @@ class Group { ...@@ -122,6 +123,7 @@ class Group {
* Starts a new Task in this Group. * Starts a new Task in this Group.
* *
* \returns The handle to the started Task. * \returns The handle to the started Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Start( Task Start(
...@@ -141,6 +143,7 @@ class Group { ...@@ -141,6 +143,7 @@ class Group {
* Starts a new Task in this Group. * Starts a new Task in this Group.
* *
* \returns The handle to the started Task. * \returns The handle to the started Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Start( Task Start(
...@@ -160,6 +163,7 @@ class Group { ...@@ -160,6 +163,7 @@ class Group {
* Starts a new Task in this Group. * Starts a new Task in this Group.
* *
* \returns The handle to the started Task. * \returns The handle to the started Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Start( Task Start(
...@@ -260,6 +264,7 @@ class Group { ...@@ -260,6 +264,7 @@ class Group {
* Allows for interoperability with the C interface. * Allows for interoperability with the C interface.
* *
* \returns The internal mtapi_group_hndl_t. * \returns The internal mtapi_group_hndl_t.
* \waitfree
*/ */
mtapi_group_hndl_t GetInternal() const { mtapi_group_hndl_t GetInternal() const {
return handle_; return handle_;
......
...@@ -54,6 +54,7 @@ public: ...@@ -54,6 +54,7 @@ public:
* Allows for interoperability with the C interface. * Allows for interoperability with the C interface.
* *
* \returns A reference to the internal mtapi_group_attributes_t structure. * \returns A reference to the internal mtapi_group_attributes_t structure.
* \waitfree
*/ */
mtapi_group_attributes_t const & GetInternal() const { mtapi_group_attributes_t const & GetInternal() const {
return attributes_; return attributes_;
......
...@@ -85,6 +85,7 @@ public: ...@@ -85,6 +85,7 @@ public:
* Allows for interoperability with the C interface. * Allows for interoperability with the C interface.
* *
* \returns The internal mtapi_job_hndl_t. * \returns The internal mtapi_job_hndl_t.
* \waitfree
*/ */
mtapi_job_hndl_t GetInternal() const { mtapi_job_hndl_t GetInternal() const {
return handle_; return handle_;
......
...@@ -166,6 +166,7 @@ class Node { ...@@ -166,6 +166,7 @@ class Node {
* Starts a new Task. * Starts a new Task.
* *
* \returns The handle to the started Task. * \returns The handle to the started Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Start( Task Start(
...@@ -186,6 +187,7 @@ class Node { ...@@ -186,6 +187,7 @@ class Node {
* Starts a new Task. * Starts a new Task.
* *
* \returns The handle to the started Task. * \returns The handle to the started Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Start( Task Start(
...@@ -205,6 +207,7 @@ class Node { ...@@ -205,6 +207,7 @@ class Node {
* Starts a new Task. * Starts a new Task.
* *
* \returns The handle to the started Task. * \returns The handle to the started Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Start( Task Start(
...@@ -224,6 +227,7 @@ class Node { ...@@ -224,6 +227,7 @@ class Node {
* Starts a new Task. * Starts a new Task.
* *
* \returns The handle to the started Task. * \returns The handle to the started Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Start( Task Start(
......
...@@ -74,6 +74,7 @@ public: ...@@ -74,6 +74,7 @@ public:
* worker threads. * worker threads.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
NodeAttributes & SetCoreAffinity( NodeAttributes & SetCoreAffinity(
embb::base::CoreSet const & cores /**< The cores to use. */ embb::base::CoreSet const & cores /**< The cores to use. */
...@@ -89,6 +90,7 @@ public: ...@@ -89,6 +90,7 @@ public:
* Sets the maximum number of concurrently active tasks. * Sets the maximum number of concurrently active tasks.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
NodeAttributes & SetMaxTasks( NodeAttributes & SetMaxTasks(
mtapi_uint_t value /**< The value to set. */ mtapi_uint_t value /**< The value to set. */
...@@ -104,6 +106,7 @@ public: ...@@ -104,6 +106,7 @@ public:
* Sets the maximum number of actions. * Sets the maximum number of actions.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
NodeAttributes & SetMaxActions( NodeAttributes & SetMaxActions(
mtapi_uint_t value /**< The value to set. */ mtapi_uint_t value /**< The value to set. */
...@@ -119,6 +122,7 @@ public: ...@@ -119,6 +122,7 @@ public:
* Sets the maximum number of groups. * Sets the maximum number of groups.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
NodeAttributes & SetMaxGroups( NodeAttributes & SetMaxGroups(
mtapi_uint_t value /**< The value to set. */ mtapi_uint_t value /**< The value to set. */
...@@ -134,6 +138,7 @@ public: ...@@ -134,6 +138,7 @@ public:
* Sets the maximum number of queues. * Sets the maximum number of queues.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
NodeAttributes & SetMaxQueues( NodeAttributes & SetMaxQueues(
mtapi_uint_t value /**< The value to set. */ mtapi_uint_t value /**< The value to set. */
...@@ -149,6 +154,7 @@ public: ...@@ -149,6 +154,7 @@ public:
* Sets the default limit (capacity) of all queues. * Sets the default limit (capacity) of all queues.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
NodeAttributes & SetQueueLimit( NodeAttributes & SetQueueLimit(
mtapi_uint_t value /**< The value to set. */ mtapi_uint_t value /**< The value to set. */
...@@ -164,6 +170,7 @@ public: ...@@ -164,6 +170,7 @@ public:
* Sets the maximum number of available jobs. * Sets the maximum number of available jobs.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
NodeAttributes & SetMaxJobs( NodeAttributes & SetMaxJobs(
mtapi_uint_t value /**< The value to set. */ mtapi_uint_t value /**< The value to set. */
...@@ -179,6 +186,7 @@ public: ...@@ -179,6 +186,7 @@ public:
* Sets the maximum number of actions per job. * Sets the maximum number of actions per job.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
NodeAttributes & SetMaxActionsPerJob( NodeAttributes & SetMaxActionsPerJob(
mtapi_uint_t value /**< The value to set. */ mtapi_uint_t value /**< The value to set. */
...@@ -195,6 +203,7 @@ public: ...@@ -195,6 +203,7 @@ public:
* will range from 0 to \c value - 1 with 0 being the highest priority. * will range from 0 to \c value - 1 with 0 being the highest priority.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
NodeAttributes & SetMaxPriorities( NodeAttributes & SetMaxPriorities(
mtapi_uint_t value /**< The value to set. */ mtapi_uint_t value /**< The value to set. */
...@@ -211,6 +220,7 @@ public: ...@@ -211,6 +220,7 @@ public:
* Allows for interoperability with the C interface. * Allows for interoperability with the C interface.
* *
* \returns A reference to the internal mtapi_node_attributes_t structure. * \returns A reference to the internal mtapi_node_attributes_t structure.
* \waitfree
*/ */
mtapi_node_attributes_t const & GetInternal() const { mtapi_node_attributes_t const & GetInternal() const {
return attributes_; return attributes_;
......
...@@ -116,6 +116,7 @@ class Queue { ...@@ -116,6 +116,7 @@ class Queue {
* Enqueues a new Task. * Enqueues a new Task.
* *
* \returns The handle to the enqueued Task. * \returns The handle to the enqueued Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Enqueue( Task Enqueue(
...@@ -135,6 +136,7 @@ class Queue { ...@@ -135,6 +136,7 @@ class Queue {
* Enqueues a new Task. * Enqueues a new Task.
* *
* \returns The handle to the enqueued Task. * \returns The handle to the enqueued Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Enqueue( Task Enqueue(
...@@ -153,6 +155,7 @@ class Queue { ...@@ -153,6 +155,7 @@ class Queue {
* Enqueues a new Task. * Enqueues a new Task.
* *
* \returns The handle to the enqueued Task. * \returns The handle to the enqueued Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Enqueue( Task Enqueue(
...@@ -171,6 +174,7 @@ class Queue { ...@@ -171,6 +174,7 @@ class Queue {
* Enqueues a new Task. * Enqueues a new Task.
* *
* \returns The handle to the enqueued Task. * \returns The handle to the enqueued Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Enqueue( Task Enqueue(
...@@ -188,6 +192,7 @@ class Queue { ...@@ -188,6 +192,7 @@ class Queue {
* Enqueues a new Task. * Enqueues a new Task.
* *
* \returns The handle to the enqueued Task. * \returns The handle to the enqueued Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Enqueue( Task Enqueue(
...@@ -206,6 +211,7 @@ class Queue { ...@@ -206,6 +211,7 @@ class Queue {
* Enqueues a new Task. * Enqueues a new Task.
* *
* \returns The handle to the enqueued Task. * \returns The handle to the enqueued Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Enqueue( Task Enqueue(
...@@ -223,6 +229,7 @@ class Queue { ...@@ -223,6 +229,7 @@ class Queue {
* Enqueues a new Task. * Enqueues a new Task.
* *
* \returns The handle to the enqueued Task. * \returns The handle to the enqueued Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Enqueue( Task Enqueue(
...@@ -240,6 +247,7 @@ class Queue { ...@@ -240,6 +247,7 @@ class Queue {
* Enqueues a new Task. * Enqueues a new Task.
* *
* \returns The handle to the enqueued Task. * \returns The handle to the enqueued Task.
* \threadsafe
*/ */
template <typename ARGS, typename RES> template <typename ARGS, typename RES>
Task Enqueue( Task Enqueue(
...@@ -257,6 +265,7 @@ class Queue { ...@@ -257,6 +265,7 @@ class Queue {
* Allows for interoperability with the C interface. * Allows for interoperability with the C interface.
* *
* \returns The internal mtapi_queue_hndl_t. * \returns The internal mtapi_queue_hndl_t.
* \waitfree
*/ */
mtapi_queue_hndl_t GetInternal() const { mtapi_queue_hndl_t GetInternal() const {
return handle_; return handle_;
......
...@@ -54,6 +54,7 @@ public: ...@@ -54,6 +54,7 @@ public:
* This determines whether the object will be visible across nodes. * This determines whether the object will be visible across nodes.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
QueueAttributes & SetGlobal( QueueAttributes & SetGlobal(
bool state /**< The state to set. */ bool state /**< The state to set. */
...@@ -71,6 +72,7 @@ public: ...@@ -71,6 +72,7 @@ public:
* If set to \c true, tasks enqueued will be executed in order. * If set to \c true, tasks enqueued will be executed in order.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
QueueAttributes & SetOrdered( QueueAttributes & SetOrdered(
bool state /**< The state to set. */ bool state /**< The state to set. */
...@@ -89,6 +91,7 @@ public: ...@@ -89,6 +91,7 @@ public:
* Otherwise the will be canceled. * Otherwise the will be canceled.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
QueueAttributes & SetRetain( QueueAttributes & SetRetain(
bool state /**< The state to set. */ bool state /**< The state to set. */
...@@ -106,6 +109,7 @@ public: ...@@ -106,6 +109,7 @@ public:
* This determines whether the object will be visible across domains. * This determines whether the object will be visible across domains.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
QueueAttributes & SetDomainShared( QueueAttributes & SetDomainShared(
bool state /**< The state to set. */ bool state /**< The state to set. */
...@@ -123,6 +127,7 @@ public: ...@@ -123,6 +127,7 @@ public:
* The priority influences the order in which tasks are chosen for execution. * The priority influences the order in which tasks are chosen for execution.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
QueueAttributes & SetPriority( QueueAttributes & SetPriority(
mtapi_uint_t priority /**< The priority to set. */ mtapi_uint_t priority /**< The priority to set. */
...@@ -138,6 +143,7 @@ public: ...@@ -138,6 +143,7 @@ public:
* Sets the limit (capacity) of a Queue. * Sets the limit (capacity) of a Queue.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
QueueAttributes & SetLimit( QueueAttributes & SetLimit(
mtapi_uint_t limit /**< The limit to set. */ mtapi_uint_t limit /**< The limit to set. */
...@@ -154,6 +160,7 @@ public: ...@@ -154,6 +160,7 @@ public:
* Allows for interoperability with the C interface. * Allows for interoperability with the C interface.
* *
* \returns A reference to the internal mtapi_queue_attributes_t structure. * \returns A reference to the internal mtapi_queue_attributes_t structure.
* \waitfree
*/ */
mtapi_queue_attributes_t const & GetInternal() const { mtapi_queue_attributes_t const & GetInternal() const {
return attributes_; return attributes_;
......
...@@ -52,6 +52,7 @@ class StatusException : public embb::base::Exception { ...@@ -52,6 +52,7 @@ class StatusException : public embb::base::Exception {
/** /**
* Returns the code of the exception. * Returns the code of the exception.
* \waitfree
*/ */
virtual int Code() const { return EMBB_ERROR; } virtual int Code() const { return EMBB_ERROR; }
}; };
......
...@@ -114,6 +114,7 @@ class Task { ...@@ -114,6 +114,7 @@ class Task {
* Allows for interoperability with the C interface. * Allows for interoperability with the C interface.
* *
* \returns The internal mtapi_task_hndl_t. * \returns The internal mtapi_task_hndl_t.
* \waitfree
*/ */
mtapi_task_hndl_t GetInternal() const { mtapi_task_hndl_t GetInternal() const {
return handle_; return handle_;
......
...@@ -55,6 +55,7 @@ public: ...@@ -55,6 +55,7 @@ public:
* waited for. * waited for.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
TaskAttributes & SetDetached( TaskAttributes & SetDetached(
bool state /**< The state to set. */ bool state /**< The state to set. */
...@@ -72,6 +73,7 @@ public: ...@@ -72,6 +73,7 @@ public:
* The priority influences the order in which tasks are chosen for execution. * The priority influences the order in which tasks are chosen for execution.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
TaskAttributes & SetPriority( TaskAttributes & SetPriority(
mtapi_uint_t priority /**< The priority to set. */ mtapi_uint_t priority /**< The priority to set. */
...@@ -90,6 +92,7 @@ public: ...@@ -90,6 +92,7 @@ public:
* the TaskContext. * the TaskContext.
* *
* \returns Reference to this object. * \returns Reference to this object.
* \notthreadsafe
*/ */
TaskAttributes & SetInstances( TaskAttributes & SetInstances(
mtapi_uint_t instances /**< Number of instances to set. */ mtapi_uint_t instances /**< Number of instances to set. */
...@@ -106,6 +109,7 @@ public: ...@@ -106,6 +109,7 @@ public:
* Allows for interoperability with the C interface. * Allows for interoperability with the C interface.
* *
* \returns A reference to the internal mtapi_task_attributes_t structure. * \returns A reference to the internal mtapi_task_attributes_t structure.
* \waitfree
*/ */
mtapi_task_attributes_t const & GetInternal() const { mtapi_task_attributes_t const & GetInternal() const {
return attributes_; return attributes_;
......
...@@ -129,6 +129,7 @@ class TaskContext { ...@@ -129,6 +129,7 @@ class TaskContext {
* Allows for interoperability with the C interface. * Allows for interoperability with the C interface.
* *
* \returns A pointer to a mtapi_task_context_t. * \returns A pointer to a mtapi_task_context_t.
* \notthreadsafe
*/ */
mtapi_task_context_t * GetInternal() const { mtapi_task_context_t * GetInternal() const {
return context_; return context_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment