src/components/io/linux-io.c
// This is called whenever a thread is initialized.
// WARNING: This can be called BEFORE init_component.
// When it is, shutdown_thread is never called, but 
// this is the default context used in calls. 
This is called whenever a thread is initialized.
WARNING: This can be called BEFORE init_component.
When it is, shutdown_thread is never called, but
this is the default context used in calls.
This is called whenever a thread is initialized . WARNING : This can be called BEFORE init_component . When it is shutdown_thread is never called but this is the default context used in calls .
static int
_io_init_thread( hwd_context_t *ctx )
{
    _io_context_t* myCtx = (_io_context_t*) ctx;
    int ret;
    ret = io_count_events(myCtx);
    if (ret != PAPI_OK) return(ret);
    if (gEventCount > 0 && myCtx->EventCount != gEventCount) {
        fclose(myCtx->pFile);
        myCtx->pFile = NULL;
        return PAPI_ENOSUPP;
    }
    fclose(myCtx->pFile);
    return PAPI_OK;
}
static int _io_init_thread ( hwd_context_t * ctx ) { _io_context_t * myCtx = ( _io_context_t * ) ctx ; int ret ; ret = io_count_events ( myCtx ) ; if ( ret != PAPI_OK ) return ( ret ) ; if ( gEventCount > 0 && myCtx -> EventCount != gEventCount ) { fclose ( myCtx -> pFile ) ; myCtx -> pFile = NULL ; return PAPI_ENOSUPP ; } fclose ( myCtx -> pFile ) ; return PAPI_OK ; }
This is called whenever a thread is initialized.
This is called whenever a thread is initialized .
// File mismatch on event count kills it.