OpenMP Runtime
Classes | Typedefs | Functions | Variables
tomp_qmss.h File Reference

API to access the QMSS sub-system. More...

#include <stdbool.h>
#include <stdint.h>
#include <ti/drv/qmss/qmss_drv.h>
#include "tomp_defs.h"
#include "tomp_log.h"
Include dependency graph for tomp_qmss.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tomp_Queues

Typedefs

typedef Qmss_QueueHnd tomp_queue_t
typedef void * tomp_event_t

Functions

bool tomp_initGlobalNRT (bool memRegionInitialized)
 Initializes the NRT (QMSS sub system) for OpenMP.
void tomp_exitGlobalNRT (void)
 Close queues and exit QMSS.
bool tomp_initLocalNRT (void)
 Per-core initialization for QMSS.
tomp_queue_t tomp_queueOpen (int32_t qid)
 Open a queue specified by qid.
static tomp_event_t tomp_eventAlloc (void)
 Allocate a buffer from the TOMP free queue.
static tomp_event_t tomp_eventAllocChecked (size_t size, const char *file, int line)
 Allocate a buffer from the TOMP free queue w/ NULL check.
static void tomp_eventFree (tomp_event_t event)
 Free a buffer allocated from the TOMP free queue.
static void tomp_eventPush (tomp_queue_t qHnd, tomp_event_t event)
 Push an event onto the tail of the specified queue.
static void tomp_eventPushToHead (tomp_queue_t qHnd, tomp_event_t event)
 Push an event onto the head of the specified queue.
static tomp_event_t tomp_eventPop (tomp_queue_t qHnd)
 Pop an event from the head of the specified queue.
static void * tomp_event_pointer (tomp_event_t event)
 Extract the storage buffer from an event.

Variables

tomp_Queues tomp_queues
Qmss_MemRegInfo tomp_qmssMemRegInfo

Detailed Description

API to access the QMSS sub-system.

Wraps the QMSS LLD APIs


Function Documentation

static void* tomp_event_pointer ( tomp_event_t  event) [inline, static]

Extract the storage buffer from an event.

Since the OpenMP runtime does not need to initialize any fields in the descriptor, the entire descriptor is teh storage buffer

Here is the caller graph for this function:

static tomp_event_t tomp_eventAlloc ( void  ) [inline, static]

Allocate a buffer from the TOMP free queue.

Returns:
event handle. Use tomp_event_pointer to convert the handle to a pointer to the event structure

Here is the caller graph for this function:

static tomp_event_t tomp_eventAllocChecked ( size_t  size,
const char *  file,
int  line 
) [inline, static]

Allocate a buffer from the TOMP free queue w/ NULL check.

Parameters:
sizesize requested
file__FILE__ at call site, for error messages
line__LINE__ at call site, for error messages
Returns:
event handle. Use tomp_event_pointer to convert the handle to a pointer to the event structure

Here is the call graph for this function:

Here is the caller graph for this function:

static void tomp_eventFree ( tomp_event_t  event) [inline, static]

Free a buffer allocated from the TOMP free queue.

Parameters:
eventBuffer to be free'd

Here is the caller graph for this function:

static tomp_event_t tomp_eventPop ( tomp_queue_t  qHnd) [inline, static]

Pop an event from the head of the specified queue.

Parameters:
qHndqueue to pop the event from
Returns:
popped event
static void tomp_eventPush ( tomp_queue_t  qHnd,
tomp_event_t  event 
) [inline, static]

Push an event onto the tail of the specified queue.

Parameters:
qHndqueue to push the event onto
eventevent to be pushed

Here is the caller graph for this function:

static void tomp_eventPushToHead ( tomp_queue_t  qHnd,
tomp_event_t  event 
) [inline, static]

Push an event onto the head of the specified queue.

Parameters:
qHndqueue to push the event onto
eventevent to be pushed

Here is the caller graph for this function:

void tomp_exitGlobalNRT ( void  )

Close queues and exit QMSS.

Called by master core only

Here is the call graph for this function:

Here is the caller graph for this function:

bool tomp_initGlobalNRT ( bool  memRegionInitialized)

Initializes the NRT (QMSS sub system) for OpenMP.

Called by the master core only. Sets up the memory region, initializes QMSS (if required) and opens the queues required by OpenMP.

NOTE: This function must be called BEFORE tomp_dispatch_once is called on the worker cores.

Here is the call graph for this function:

tomp_queue_t tomp_queueOpen ( int32_t  qid)

Open a queue specified by qid.

If the queue is already open, report error

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Qmss_MemRegInfo tomp_qmssMemRegInfo

Memory region used by the OpenMP Runtime

Queues used by the OpenMP Runtime

 All Classes Files Functions Variables Typedefs Enumerations Defines