STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions

Class to return exit codes from STAPL applications. More...

Public Member Functions

 exit_code (int code)
 
exit_codeoperator= (exit_code const &)=delete
 
void wait (void) const
 Waits for all locations to create an instance of exit_code and call wait(). More...
 
int get_code (void) const noexcept
 
bool operator== (const int code) const noexcept
 
bool operator!= (const int code) const noexcept
 

Detailed Description

Class to return exit codes from STAPL applications.

A 0 exit code requires SPMD creation of an exit_code object, whereas a non 0 exit code does not. As such, the following uses are correct:

{
return EXIT_SUCCESS;
}
{
return EXIT_FAILURE;
}
{
if (condition)
return EXIT_FAILURE;
return EXIT_SUCCESS;
}

whereas the following is not:

{
if (condition)
return EXIT_SUCCESS;
return EXIT_FAILURE;
}
Warning
Users should not instantiate objects of this class explicitly. Instances should only be instantiated through implicit conversion from int.

Member Function Documentation

◆ wait()

void stapl::exit_code::wait ( void  ) const

Waits for all locations to create an instance of exit_code and call wait().

Warning
This function has to be called outside the scope the initial exit_code object was created in.

The documentation for this class was generated from the following files: