OpenHiva::ScheduleGroup

The thread group parameter needs to be transferred when the OpenHiva::Init interface is invoked. Therefore, you need to create a thread group (ScheduleGroup) in advance. The definition of OpenHiva::ScheduleGroup is as follows, including the thread group name (groupName) and scheduling type (scheduleType):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
namespace OpenHiva {
// Thread group scheduling type
enum ScheduleType {              
    UNBIND_AICPU = 0,               // Non-binding thread, non-deterministic scheduling
    BIND_AICPU,                 // DSF-AICPU binding thread, deterministic scheduling
    USER_DEFINED,          // The user, instead of the Hiva framework, starts a thread. This parameter is used together with SpinOnce.
}; 
// Thread group structure
struct ScheduleGroup {  
    std::string groupName;     // Thread group name. Ensure that the thread group name is unique in each process.
    ScheduleType scheduleType; // Scheduling type
}; 
}