BeBOP: pOSKI  v1.0.0
parallel Optimized Sparse Kernel Interface library
 All Files Functions Variables
Functions | Variables
poski_LogFileHandler.c File Reference

Handle the message output file. More...

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <assert.h>
#include <poski/poski_print.h>
#include <poski/poski_system.h>

Functions

void poski_InitSetLogFile ()
 [library's internal use] Set the output file <poski_logfile>.
void poski_CloseLogFile ()
 [library's internal use] Unset the output file <poski_logfile>.
int test_main_poski_LogFileHandler ()
 Test the poski_LogFileHandler's routines.

Variables

FILE * poski_logfile
 [library's internal use] File to where output messages should be directed.

Detailed Description

Handle the message output file.

This module implements the message output file <poski_logfile> support routines based on the environment variable POSKI_LOG_FILE.

This module sets <poski_logfile> to "poski_log.txt" if POSKI_LOG_FILE==1, or to stderr otherwise.

NOTE: If the library is build with pthread support, these routines are thread-safe using pthread mutex.

Attention:
These routines are usually for the library's internal use and should not normally be called directly by users.
Called by poski_InitCloseHandler.c

Also, refer poski_MessageHandler.c


Function Documentation

[library's internal use] Set the output file <poski_logfile>.

NOTE: This routine is for the library's internal use only and should not normally be called directly by users.

[library's internal use] Unset the output file <poski_logfile>.

NOTE: This routine is for the library's internal use only and should not normally be called directly by users.

Test the poski_LogFileHandler's routines.

This routine is for testing the functionality of the poski_LogFileHandler's routines.

Returns:
0 if success, or an error message otherwise.