API Reference Manual  1.48.0
api/spec/thrmask.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2015-2018 Linaro Limited
3  */
4 
11 #ifndef ODP_API_SPEC_THRMASK_H_
12 #define ODP_API_SPEC_THRMASK_H_
13 #include <odp/visibility_begin.h>
14 
15 #include <odp/api/std_types.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
48 void odp_thrmask_from_str(odp_thrmask_t *mask, const char *str);
49 
65 int32_t odp_thrmask_to_str(const odp_thrmask_t *mask, char *str, int32_t size);
66 
72 
78 void odp_thrmask_set(odp_thrmask_t *mask, int thr);
79 
90 
96 void odp_thrmask_clr(odp_thrmask_t *mask, int thr);
97 
107 int odp_thrmask_isset(const odp_thrmask_t *mask, int thr);
108 
117 
126  const odp_thrmask_t *src2);
127 
136  const odp_thrmask_t *src2);
137 
146  const odp_thrmask_t *src2);
147 
158  const odp_thrmask_t *mask2);
159 
167 
177 
187 
209 int odp_thrmask_next(const odp_thrmask_t *mask, int thr);
210 
222 
234 
239 #ifdef __cplusplus
240 }
241 #endif
242 
243 #include <odp/visibility_end.h>
244 #endif
Standard C language types and definitions for ODP.
int odp_thrmask_next(const odp_thrmask_t *mask, int thr)
Find next set thread in mask.
void odp_thrmask_copy(odp_thrmask_t *dest, const odp_thrmask_t *src)
Copy a thread mask.
void odp_thrmask_and(odp_thrmask_t *dest, const odp_thrmask_t *src1, const odp_thrmask_t *src2)
Member-wise AND over two thread masks.
void odp_thrmask_xor(odp_thrmask_t *dest, const odp_thrmask_t *src1, const odp_thrmask_t *src2)
Member-wise XOR over two thread masks.
void odp_thrmask_from_str(odp_thrmask_t *mask, const char *str)
Add thread mask bits from a string.
int odp_thrmask_worker(odp_thrmask_t *mask)
Worker thread mask.
int odp_thrmask_count(const odp_thrmask_t *mask)
Count number of threads set in mask.
void odp_thrmask_set(odp_thrmask_t *mask, int thr)
Add thread to mask.
int odp_thrmask_last(const odp_thrmask_t *mask)
Find last set thread in mask.
int odp_thrmask_control(odp_thrmask_t *mask)
Control thread mask.
int odp_thrmask_equal(const odp_thrmask_t *mask1, const odp_thrmask_t *mask2)
Test if two thread masks contain the same threads.
int odp_thrmask_isset(const odp_thrmask_t *mask, int thr)
Test if thread is a member of mask.
void odp_thrmask_clr(odp_thrmask_t *mask, int thr)
Remove thread from mask.
int odp_thrmask_first(const odp_thrmask_t *mask)
Find first set thread in mask.
void odp_thrmask_setall(odp_thrmask_t *mask)
Set all threads in mask.
void odp_thrmask_or(odp_thrmask_t *dest, const odp_thrmask_t *src1, const odp_thrmask_t *src2)
Member-wise OR over two thread masks.
int32_t odp_thrmask_to_str(const odp_thrmask_t *mask, char *str, int32_t size)
Format a string from thread mask.
void odp_thrmask_zero(odp_thrmask_t *mask)
Clear entire thread mask.