source: proiecte/swift/trunk/include/swift_scheduler.h @ 176

Last change on this file since 176 was 176, checked in by (none), 14 years ago
  • imported repo from "guagal"
File size: 1.2 KB
Line 
1/*
2 * swift_scheduler.h
3 *
4 * (c) 2009 Ionut Rosoiu <ionut.rosoiu@gmail.com>
5 *
6 */
7
8#ifndef SWIFT_SCHEDULER_H_
9#define SWIFT_SCHEDULER_H_
10
11#include "swift_common.h"
12#include "swift_backoff.h"
13#include "swift_context.h"
14#include "swift_thread.h"
15#include "swift_deque.h"
16#include "swift_log.h"
17#include "swift_compiler.h"
18
19/**
20 * Try to get a frame either from own workque or from another thread
21 */
22swift_frame_t* swift_get_frame(swift_context_t *context, swift_thread_t *thread);
23
24/**
25 * Get the steal target according to the current steal strategy
26 */
27swift_thread_t* swift_get_steal_target(swift_context_t *context, swift_thread_t* thread);
28
29/**
30 * Try to execute some work either by removing frames from own workqueue, or by stealing
31 */
32void swift_scheduler_execute(swift_thread_t *thread);
33
34/**
35 * Signal the finish of this frame (i.e. decrement the sync number and the data dependencies)
36 */
37void swift_signal_frame_done(swift_thread_t *thread, swift_frame_t *frame);
38
39/**
40 * Retire the frame to the pool
41 * If this is the frame that started the parallel computation, end it
42 */
43void swift_frame_done(swift_context_t *context,
44                                          swift_thread_t *thread,
45                                          swift_frame_t *frame);
46
47#endif /* SWIFT_SCHEDULER_H_ */
Note: See TracBrowser for help on using the repository browser.