API Reference Manual  1.45.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 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 #include <odp/api/std_types.h>
20 
43 void odp_thrmask_from_str(odp_thrmask_t *mask, const char *str);
44 
60 int32_t odp_thrmask_to_str(const odp_thrmask_t *mask, char *str, int32_t size);
61 
67 
73 void odp_thrmask_set(odp_thrmask_t *mask, int thr);
74 
85 
91 void odp_thrmask_clr(odp_thrmask_t *mask, int thr);
92 
102 int odp_thrmask_isset(const odp_thrmask_t *mask, int thr);
103 
112 
121  const odp_thrmask_t *src2);
122 
131  const odp_thrmask_t *src2);
132 
141  const odp_thrmask_t *src2);
142 
153  const odp_thrmask_t *mask2);
154 
162 
172 
182 
204 int odp_thrmask_next(const odp_thrmask_t *mask, int thr);
205 
217 
229 
234 #ifdef __cplusplus
235 }
236 #endif
237 
238 #include <odp/visibility_end.h>
239 #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.