StarPU Internal Handbook
errorcheck.h
Go to the documentation of this file.
1 /* StarPU --- Runtime system for heterogeneous multicore architectures.
2  *
3  * Copyright (C) 2009-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
4  *
5  * StarPU is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation; either version 2.1 of the License, or (at
8  * your option) any later version.
9  *
10  * StarPU is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
15  */
16 
17 #ifndef __ERRORCHECK_H__
18 #define __ERRORCHECK_H__
19 
22 #include <starpu.h>
23 
24 #pragma GCC visibility push(hidden)
25 
32 {
33  STATUS_INDEX_INITIALIZING = 0,
34  STATUS_INDEX_EXECUTING,
35  STATUS_INDEX_CALLBACK,
36  STATUS_INDEX_WAITING,
37  STATUS_INDEX_SLEEPING,
38  STATUS_INDEX_SCHEDULING,
39  STATUS_INDEX_NR,
40 };
41 
44 {
51  STATUS_INITIALIZING = 1 << STATUS_INDEX_INITIALIZING,
53  STATUS_EXECUTING = 1 << STATUS_INDEX_EXECUTING,
55  STATUS_CALLBACK = 1 << STATUS_INDEX_CALLBACK,
57  STATUS_WAITING = 1 << STATUS_INDEX_WAITING,
59  STATUS_SLEEPING = 1 << STATUS_INDEX_SLEEPING,
61  STATUS_SCHEDULING = 1 << STATUS_INDEX_SCHEDULING,
62 };
63 
64 struct _starpu_worker;
67 void _starpu_add_worker_status(struct _starpu_worker *worker, enum _starpu_worker_status_index st, struct timespec *time);
68 void _starpu_add_local_worker_status(enum _starpu_worker_status_index st, struct timespec *time);
69 
71 void _starpu_clear_worker_status(struct _starpu_worker *worker, enum _starpu_worker_status_index st, struct timespec *time);
72 void _starpu_clear_local_worker_status(enum _starpu_worker_status_index st, struct timespec *time);
73 
76 
81 
82 #pragma GCC visibility pop
83 
84 #endif // __ERRORCHECK_H__
enum _starpu_worker_status _starpu_get_local_worker_status(void)
_starpu_worker_status
Definition: errorcheck.h:44
@ STATUS_INITIALIZING
Definition: errorcheck.h:51
@ STATUS_SLEEPING
Definition: errorcheck.h:59
@ STATUS_WAITING
Definition: errorcheck.h:57
@ STATUS_UNKNOWN
Definition: errorcheck.h:49
@ STATUS_EXECUTING
Definition: errorcheck.h:53
@ STATUS_CALLBACK
Definition: errorcheck.h:55
@ STATUS_SCHEDULING
Definition: errorcheck.h:61
@ STATUS_INVALID
Definition: errorcheck.h:47
void _starpu_clear_worker_status(struct _starpu_worker *worker, enum _starpu_worker_status_index st, struct timespec *time)
unsigned _starpu_worker_may_perform_blocking_calls(void)
_starpu_worker_status_index
Definition: errorcheck.h:32
void _starpu_add_worker_status(struct _starpu_worker *worker, enum _starpu_worker_status_index st, struct timespec *time)
Definition: workers.h:155