LibCircle  0.2.1-rc.1
A simple interface for processing workloads using an automatically distributed global queue.
queue.c File Reference
+ Include dependency graph for queue.c:

Functions

CIRCLE_internal_queue_t * CIRCLE_internal_queue_init (void)
 
int8_t CIRCLE_internal_queue_free (CIRCLE_internal_queue_t *qp)
 
void CIRCLE_internal_queue_dump (CIRCLE_internal_queue_t *qp)
 
void CIRCLE_internal_queue_print (CIRCLE_internal_queue_t *qp)
 
int8_t CIRCLE_internal_queue_str_extend (CIRCLE_internal_queue_t *qp, int32_t new_size)
 
int8_t CIRCLE_internal_queue_extend (CIRCLE_internal_queue_t *qp, size_t new_size)
 
int8_t CIRCLE_internal_queue_push (CIRCLE_internal_queue_t *qp, char *str)
 
int8_t CIRCLE_internal_queue_pop (CIRCLE_internal_queue_t *qp, char *str)
 
int8_t CIRCLE_internal_queue_read (CIRCLE_internal_queue_t *qp, int rank)
 
int8_t CIRCLE_internal_queue_write (CIRCLE_internal_queue_t *qp, int rank)
 

Detailed Description

This file contains functions related to the local queue structure.

Function Documentation

◆ CIRCLE_internal_queue_dump()

void CIRCLE_internal_queue_dump ( CIRCLE_internal_queue_t *  qp)

Dump the raw contents of the queue structure to logging.

Parameters
qpthe queue structure that should be dumped.

◆ CIRCLE_internal_queue_extend()

int8_t CIRCLE_internal_queue_extend ( CIRCLE_internal_queue_t *  qp,
size_t  new_size 
)

Extend the circle queue size

Referenced by CIRCLE_internal_queue_push().

+ Here is the caller graph for this function:

◆ CIRCLE_internal_queue_free()

int8_t CIRCLE_internal_queue_free ( CIRCLE_internal_queue_t *  qp)

Free the memory used by a libcircle basic queue structure.

Parameters
qpthe reference to the queue that should be freed.
Returns
a negative value on failure, a positive one on success.

Referenced by CIRCLE_finalize(), and CIRCLE_internal_queue_init().

+ Here is the caller graph for this function:

◆ CIRCLE_internal_queue_init()

CIRCLE_internal_queue_t* CIRCLE_internal_queue_init ( void  )

Allocate memory for the basic queue structure used by libcircle.

Returns
a reference to the allocated queue structure.
See also
CIRCLE_internal_queue_free

References CIRCLE_internal_queue_free().

+ Here is the call graph for this function:

◆ CIRCLE_internal_queue_pop()

int8_t CIRCLE_internal_queue_pop ( CIRCLE_internal_queue_t *  qp,
char *  str 
)

Removes an item from the queue and returns a copy.

Parameters
qpthe queue structure to remove the item from.
stra reference to the value removed.
Returns
a positive value on success, a negative one otherwise.

Referenced by CIRCLE_internal_queue_write().

+ Here is the caller graph for this function:

◆ CIRCLE_internal_queue_print()

void CIRCLE_internal_queue_print ( CIRCLE_internal_queue_t *  qp)

Pretty-print the queue data structure.

Parameters
qpthe queue structure that should be pretty-printed.

◆ CIRCLE_internal_queue_push()

int8_t CIRCLE_internal_queue_push ( CIRCLE_internal_queue_t *  qp,
char *  str 
)

Push the specified string onto the queue structure.

Parameters
qpthe queue structure to push the value onto.
strthe string value to push onto the queue.
Returns
a positive number on success, a negative one on failure.

References CIRCLE_internal_queue_extend(), and CIRCLE_internal_queue_str_extend().

Referenced by CIRCLE_internal_queue_read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CIRCLE_internal_queue_read()

int8_t CIRCLE_internal_queue_read ( CIRCLE_internal_queue_t *  qp,
int  rank 
)

Read a queue checkpoint file into working memory.

Parameters
qpthe queue structure to read the checkpoint file into.
rankthe node which holds the checkpoint file.
Returns
a positive value on success, a negative one otherwise.

References CIRCLE_internal_queue_push().

Referenced by _CIRCLE_read_restarts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CIRCLE_internal_queue_str_extend()

int8_t CIRCLE_internal_queue_str_extend ( CIRCLE_internal_queue_t *  qp,
int32_t  new_size 
)

Extend the string array size size

Referenced by CIRCLE_internal_queue_push().

+ Here is the caller graph for this function:

◆ CIRCLE_internal_queue_write()

int8_t CIRCLE_internal_queue_write ( CIRCLE_internal_queue_t *  qp,
int  rank 
)

Write out the queue structure to a checkpoint file.

Parameters
qpthe queue structure to be written to the checkpoint file.
rankthe node which is writing out the checkpoint file.
Returns
a positive value on success, negative otherwise.

References CIRCLE_internal_queue_pop().

Referenced by _CIRCLE_checkpoint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: