StarPU Internal Handbook
Loading...
Searching...
No Matches
sched_ctx_list.h
Go to the documentation of this file.
1/* StarPU --- Runtime system for heterogeneous multicore architectures.
2 *
3 * Copyright (C) 2013-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 __SCHED_CONTEXT_LIST_H__
18#define __SCHED_CONTEXT_LIST_H__
19
20#pragma GCC visibility push(hidden)
21
27{
28 struct _starpu_sched_ctx_list *prev;
29 struct _starpu_sched_ctx_list *next;
30 struct _starpu_sched_ctx_elt *head;
31 unsigned priority;
32};
33
36{
37 struct _starpu_sched_ctx_elt *prev;
38 struct _starpu_sched_ctx_elt *next;
39 struct _starpu_sched_ctx_list *parent;
40 unsigned sched_ctx;
41 long task_number;
42 unsigned last_poped;
43};
44
46{
47 struct _starpu_sched_ctx_list *list_head;
48 struct _starpu_sched_ctx_elt *cursor;
49};
50
52struct _starpu_sched_ctx_elt* _starpu_sched_ctx_elt_find(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
53void _starpu_sched_ctx_elt_ensure_consistency(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
54void _starpu_sched_ctx_elt_init(struct _starpu_sched_ctx_elt *elt, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
55struct _starpu_sched_ctx_elt* _starpu_sched_ctx_elt_add_after(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
56struct _starpu_sched_ctx_elt* _starpu_sched_ctx_elt_add_before(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
57struct _starpu_sched_ctx_elt* _starpu_sched_ctx_elt_add(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
58void _starpu_sched_ctx_elt_remove(struct _starpu_sched_ctx_list *list, struct _starpu_sched_ctx_elt *elt) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
59int _starpu_sched_ctx_elt_exists(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
60int _starpu_sched_ctx_elt_get_priority(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
61
62
64struct _starpu_sched_ctx_list* _starpu_sched_ctx_list_find(struct _starpu_sched_ctx_list *list, unsigned prio) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
65struct _starpu_sched_ctx_elt* _starpu_sched_ctx_list_add_prio(struct _starpu_sched_ctx_list **list, unsigned prio, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
66int _starpu_sched_ctx_list_add(struct _starpu_sched_ctx_list **list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
67void _starpu_sched_ctx_list_remove_elt(struct _starpu_sched_ctx_list **list, struct _starpu_sched_ctx_elt *rm) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
68int _starpu_sched_ctx_list_remove(struct _starpu_sched_ctx_list **list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
69int _starpu_sched_ctx_list_move(struct _starpu_sched_ctx_list **list, unsigned sched_ctx, unsigned prio_to) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
70int _starpu_sched_ctx_list_exists(struct _starpu_sched_ctx_list *list, unsigned prio) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
71void _starpu_sched_ctx_list_remove_all(struct _starpu_sched_ctx_list *list) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
72void _starpu_sched_ctx_list_delete(struct _starpu_sched_ctx_list **list) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
73
75int _starpu_sched_ctx_list_push_event(struct _starpu_sched_ctx_list *list, unsigned sched_ctx);
76int _starpu_sched_ctx_list_pop_event(struct _starpu_sched_ctx_list *list, unsigned sched_ctx);
77int _starpu_sched_ctx_list_pop_all_event(struct _starpu_sched_ctx_list *list, unsigned sched_ctx);
78
80int _starpu_sched_ctx_list_iterator_init(struct _starpu_sched_ctx_list *list, struct _starpu_sched_ctx_list_iterator *it) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
81int _starpu_sched_ctx_list_iterator_has_next(struct _starpu_sched_ctx_list_iterator *it) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
82struct _starpu_sched_ctx_elt* _starpu_sched_ctx_list_iterator_get_next(struct _starpu_sched_ctx_list_iterator *it) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
83
84#pragma GCC visibility pop
85
86#endif // __SCHED_CONTEXT_H__
int _starpu_sched_ctx_list_push_event(struct _starpu_sched_ctx_list *list, unsigned sched_ctx)
struct _starpu_sched_ctx_elt * _starpu_sched_ctx_elt_find(struct _starpu_sched_ctx_list *list, unsigned sched_ctx) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT
int _starpu_sched_ctx_list_iterator_init(struct _starpu_sched_ctx_list *list, struct _starpu_sched_ctx_list_iterator *it) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT
struct _starpu_sched_ctx_list * _starpu_sched_ctx_list_find(struct _starpu_sched_ctx_list *list, unsigned prio) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT
Definition sched_ctx_list.h:36
Definition sched_ctx_list.h:27
Definition sched_ctx_list.h:46