ia64/xen-unstable

view extras/mini-os/include/sched.h @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents 183d2d7adc2f
children
line source
1 #ifndef __SCHED_H__
2 #define __SCHED_H__
4 #include <mini-os/list.h>
5 #include <mini-os/time.h>
6 #include <mini-os/arch_sched.h>
7 #ifdef HAVE_LIBC
8 #include <sys/reent.h>
9 #endif
11 struct thread
12 {
13 char *name;
14 char *stack;
15 #if !defined(__ia64__)
16 /* keep in that order */
17 unsigned long sp; /* Stack pointer */
18 unsigned long ip; /* Instruction pointer */
19 #else /* !defined(__ia64__) */
20 thread_regs_t regs;
21 #endif /* !defined(__ia64__) */
22 struct minios_list_head thread_list;
23 u32 flags;
24 s_time_t wakeup_time;
25 #ifdef HAVE_LIBC
26 struct _reent reent;
27 #endif
28 };
30 extern struct thread *idle_thread;
31 void idle_thread_fn(void *unused);
33 #define RUNNABLE_FLAG 0x00000001
35 #define is_runnable(_thread) (_thread->flags & RUNNABLE_FLAG)
36 #define set_runnable(_thread) (_thread->flags |= RUNNABLE_FLAG)
37 #define clear_runnable(_thread) (_thread->flags &= ~RUNNABLE_FLAG)
39 #define switch_threads(prev, next) arch_switch_threads(prev, next)
41 /* Architecture specific setup of thread creation. */
42 struct thread* arch_create_thread(char *name, void (*function)(void *),
43 void *data);
45 void init_sched(void);
46 void run_idle_thread(void);
47 struct thread* create_thread(char *name, void (*function)(void *), void *data);
48 void exit_thread(void) __attribute__((noreturn));
49 void schedule(void);
51 #ifdef __INSIDE_MINIOS__
52 #define current get_current()
53 #endif
55 void wake(struct thread *thread);
56 void block(struct thread *thread);
57 void msleep(u32 millisecs);
59 #endif /* __SCHED_H__ */