Esempio n. 1
0
/**
 * Initialise the LPEL
 *
 *  num_workers, proc_workers > 0
 *  proc_others >= 0
 *
 *
 * EXCLUSIVE: only valid, if
 *       #proc_avail >= proc_workers + proc_others &&
 *       proc_others != 0 &&
 *       num_workers == proc_workers
 *
 */
void LpelInit(lpel_config_t *cfg)
{
  /* Initialise hardware information for thread pinning */
  LpelHwLocInit(cfg);

#ifdef USE_MCTX_PCL
  int res = co_thread_init();
  /* initialize machine context for main thread */
  assert( 0 == res);
#endif
}
Esempio n. 2
0
/**
 * Initialise the LPEL
 *
 *  num_workers, proc_workers > 0
 *  proc_others >= 0
 *
 *
 * EXCLUSIVE: only valid, if
 *       #proc_avail >= proc_workers + proc_others &&
 *       proc_others != 0 &&
 *       num_workers == proc_workers
 *
 */
void LpelInit(lpel_config_t *cfg)
{
  /* store a local copy of cfg */
  _lpel_global_config = *cfg;
  
#ifdef USE_SCC
  //SCCInit(0,_lpel_global_config.num_workers);
#else
  /* Initialise hardware information for thread pinning */
  LpelHwLocInit(cfg);
#endif /*USE_SCC*/

#ifdef USE_MCTX_PCL
  int res = co_thread_init();
  /* initialize machine context for main thread */
  assert( 0 == res);
#endif
}