Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

At the moment, this function takes a core ID, a function, and a set of arguments for the function, and then schedules the thread to run on the target core at the next available opportunity.

 

...

This function operates like nanosleep by relinquishing control of the thread for at least `ns` nanoseconds.

 

threadInit()

This function must be called before any other calls to the Arachne library, and initializes state for managing threads.

Sample Arachne Application

Code Block
int main(int argc, char** argv){       
    // Initialize the library          
    Arachne::threadInit();             
                                       
    // Add some work                   
    Arachne::createThread(0, producer);
    Arachne::createThread(1, consumer);
    fflush(stdout);                    
    // Must be the last call           
    Arachne::mainThreadJoinPool();     
}                                      

 

 

 This page is deprecated. Please see the API Documentation.