Mission Base

Program Base Library Functions

int pblPriorityQueueInsert

( PblPriorityQueue* queue,
  int priority, void* element )

Inserts the element with the specified priority into the priority queue and maintains the heap condition of the priority queue.

Documentation

Inserts the element with the specified priority into the priority queue and maintains the heap condition of the priority queue.

This function has a time complexity of O(Log N), with N being the number of elements in the queue.

Parameters:
queue - The queue to use
priority - Priority of the element to be inserted
element - Element to be inserted to the queue
Returns:
int rc >= 0: The size of the queue.
int rc < 0: An error, see pbl_errno:
PBL_ERROR_OUT_OF_MEMORY - Out of memory.

Alphabetic index



This page was generated with the help of DOC++.