EM-ODP
3.7.0
Event Machine on ODP
|
Go to the source code of this file.
Macros | |
#define | em_get_type_major em_event_type_major |
#define | em_get_type_minor em_event_type_minor |
Event Machine HW specific functions and other additions.
Definition in file event_machine_hw_specific.h.
void em_core_mask_and | ( | em_core_mask_t * | dst, |
const em_core_mask_t * | src1, | ||
const em_core_mask_t * | src2 | ||
) |
Bitwise AND operation on two masks, store the result in 'dst'
dst = src1 & src2
[out] | dst | Destination core mask, result is stored here |
src1 | Source mask #1 | |
src2 | Source mask #2 |
Definition at line 181 of file event_machine_hw_specific.c.
void em_core_mask_clr | ( | int | core, |
em_core_mask_t * | mask | ||
) |
Clear a bit in the mask.
core | Core id | |
[out] | mask | Core mask |
Definition at line 53 of file event_machine_hw_specific.c.
void em_core_mask_copy | ( | em_core_mask_t * | dst, |
const em_core_mask_t * | src | ||
) |
Copy core mask
[out] | dst | Destination core mask |
src | Source core mask |
Definition at line 82 of file event_machine_hw_specific.c.
int em_core_mask_count | ( | const em_core_mask_t * | mask | ) |
Count the number of bits set in the mask.
mask | Core mask |
Definition at line 87 of file event_machine_hw_specific.c.
int em_core_mask_equal | ( | const em_core_mask_t * | mask1, |
const em_core_mask_t * | mask2 | ||
) |
Test if two masks are equal
mask1 | First core mask |
mask2 | Second core mask |
Definition at line 71 of file event_machine_hw_specific.c.
int em_core_mask_get_bits | ( | uint64_t | bits[], |
int | len, | ||
const em_core_mask_t * | mask | ||
) |
Get core mask, stored in a uint64_t array for the user
core 0: bits[0] = 0x1 (len = 1) core 1: bits[0] = 0x2 (len = 1) ... core 64: bits[0] = 0x0, bits[1] = 0x1 (len = 2) core 65: bits[0] = 0x0, bits[1] = 0x2 (len = 2) ... cores 0-127: bits[0]=0xffffffffffffffff, bits[1]=0xffffffffffffffff (len=2) ...
[out] | bits | Array of uint64_t:s that the core mask will be stored in. |
len | Number of array elements in bits[]. | |
mask | Core mask to get bits from. |
Definition at line 115 of file event_machine_hw_specific.c.
int em_core_mask_idx | ( | int | n, |
const em_core_mask_t * | mask | ||
) |
Return the index (position) of the Nth set bit in the core mask
n | Nth set bit, note n=1 means first set bit, n=[1...MaxCores] |
mask | Core mask |
Definition at line 164 of file event_machine_hw_specific.c.
int em_core_mask_isset | ( | int | core, |
const em_core_mask_t * | mask | ||
) |
Test if a bit is set in the mask.
core | Core id |
mask | Core mask |
Definition at line 58 of file event_machine_hw_specific.c.
int em_core_mask_iszero | ( | const em_core_mask_t * | mask | ) |
Test if the mask is all zero.
mask | Core mask |
Definition at line 63 of file event_machine_hw_specific.c.
void em_core_mask_or | ( | em_core_mask_t * | dst, |
const em_core_mask_t * | src1, | ||
const em_core_mask_t * | src2 | ||
) |
Bitwise OR operation on two masks, store the result in 'dst'
dst = src1 | src2
[out] | dst | Destination core mask, result is stored here |
src1 | Source mask #1 | |
src2 | Source mask #2 |
Definition at line 188 of file event_machine_hw_specific.c.
void em_core_mask_set | ( | int | core, |
em_core_mask_t * | mask | ||
) |
Set a bit in the mask.
core | Core id | |
[out] | mask | Core mask |
Definition at line 48 of file event_machine_hw_specific.c.
void em_core_mask_set_bits | ( | const uint64_t | bits[], |
int | len, | ||
em_core_mask_t * | mask | ||
) |
Set specified bits from 'bits[]' in core mask.
core 0: bits[0] = 0x1 (len = 1) core 1: bits[0] = 0x2 (len = 1) ... core 64: bits[0] = 0x0, bits[1] = 0x1 (len = 2) core 65: bits[0] = 0x0, bits[1] = 0x2 (len = 2) ... cores 0-127: bits[0]=0xffffffffffffffff, bits[1]=0xffffffffffffffff (len=2) ...
bits | Array of uint64_t:s with the bits to set in the core mask | |
len | Number of array elements in bits[]. | |
[out] | mask | Core mask to set. |
Definition at line 92 of file event_machine_hw_specific.c.
void em_core_mask_set_count | ( | int | count, |
em_core_mask_t * | mask | ||
) |
Set a range (0...count-1) of bits in the mask.
count | Number of bits to set | |
[out] | mask | Core mask |
Definition at line 76 of file event_machine_hw_specific.c.
int em_core_mask_set_str | ( | const char * | mask_str, |
em_core_mask_t * | mask | ||
) |
Set bits in a mask according to a given string.
mask_str | String containing '0xcoremask' to set | |
[out] | mask | Core mask to set |
Definition at line 146 of file event_machine_hw_specific.c.
void em_core_mask_tostr | ( | char * | mask_str, |
int | len, | ||
const em_core_mask_t * | mask | ||
) |
Get core mask in string format
[out] | mask_str | String into which the core mask will be printed |
len | Length of 'mask_str' | |
mask | Core mask to convert to string format |
Definition at line 156 of file event_machine_hw_specific.c.
void em_core_mask_xor | ( | em_core_mask_t * | dst, |
const em_core_mask_t * | src1, | ||
const em_core_mask_t * | src2 | ||
) |
Bitwise XOR operation on two masks, store the result in 'dst'
dst = src1 ^ src2
[out] | dst | Destination core mask, result is stored here |
src1 | Source mask #1 | |
src2 | Source mask #2 |
Definition at line 195 of file event_machine_hw_specific.c.
void em_core_mask_zero | ( | em_core_mask_t * | mask | ) |
Zero the whole mask.
[out] | mask | Core mask to zero (clear) |
Definition at line 43 of file event_machine_hw_specific.c.