src/components/sde/sde.c
/** This function creates the SDE component structure for an individual 
  software library and returns a handle to the structure.
  @param[in] name_of_library -- library name
  @param[in] event_count -- number of exposed software defeined events 
  @param[out] sde_handle -- opaque pointer to sde structure for initialized 
  library
  */
This function creates the SDE component structure for an individual
software library and returns a handle to the structure.
This function creates the SDE component structure for an individual software library and returns a handle to the structure .
papi_handle_t 
__attribute__((visibility("default")))
papi_sde_init(const char *name_of_library)
{
    papisde_library_desc_t *tmp_lib;
    SUBDBG("Registering library: '%s'\n",name_of_library);
    papi_sde_lock();
    tmp_lib = do_sde_init(name_of_library);
    papi_sde_unlock();
    SUBDBG("Library '%s' has been registered.\n",name_of_library);
    return tmp_lib;
}
papi_handle_t __attribute__ ( ( visibility ( " " ) ) ) papi_sde_init ( const char * name_of_library ) { papisde_library_desc_t * tmp_lib ; SUBDBG ( " \n " , name_of_library ) ; papi_sde_lock ( ) ; tmp_lib = do_sde_init ( name_of_library ) ; papi_sde_unlock ( ) ; SUBDBG ( " \n " , name_of_library ) ; return tmp_lib ; }
This function creates the SDE component structure for an individual
software library and returns a handle to the structure.
This function creates the SDE component structure for an individual software library and returns a handle to the structure .
// Lock before we read and/or modify the global structures. // Put the actual work in a different function so we call it from other // places in the component.  We have to do this because we cannot call // papi_sde_init() from places in the code which already call // papi_sde_lock()/papi_sde_unlock(), or we will end up with deadlocks.