Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 124 → Rev 125

/SPARTAN/trunk/include/synch/semaphore.h
36,7 → 36,7
 
struct semaphore
{
waitq_t wq;
waitq_t wq;
};
 
#define semaphore_down(s) \
/SPARTAN/trunk/include/synch/waitq.h
39,9 → 39,9
#define WAKEUP_ALL 1
 
struct waitq {
spinlock_t lock;
int missed_wakeups;
link_t head;
spinlock_t lock;
int missed_wakeups;
link_t head;
};
 
#define waitq_sleep(wq) \
/SPARTAN/trunk/include/stackarg.h
50,6 → 50,6
((type) *((ap).last + ++((ap).pos)))
 
#define va_end(ap)
 
 
#endif
/SPARTAN/trunk/include/time/timeout.h
34,7 → 34,7
#include <synch/spinlock.h>
#include <list.h>
 
#define us2ticks(us) ((__u64)(((__u32) (us)/(1000000/HZ))))
#define us2ticks(us) ((__u64)(((__u32) (us)/(1000000/HZ))))
 
typedef void (* timeout_handler)(void *arg);
 
/SPARTAN/trunk/include/proc/thread.h
73,12 → 73,16
 
context_t saved_context;
context_t sleep_timeout_context;
fpu_context_t saved_fpu_context;
int fpu_context_exists;
int fpu_context_engaged; /* Defined only if thread doesn't run. It means that fpu context is in CPU
that last time executes this thread. This disables migration */
fpu_context_t saved_fpu_context;
int fpu_context_exists;
 
/*
* Defined only if thread doesn't run.
* It means that fpu context is in CPU that last time executes this thread.
* This disables migration
*/
int fpu_context_engaged;
 
waitq_t *sleep_queue;
timeout_t sleep_timeout;
volatile int timeout_pending;
/SPARTAN/trunk/include/mm/page.h
42,14 → 42,14
#define PAGE_WRITE_SHIFT 4
#define PAGE_EXEC_SHIFT 5
 
#define PAGE_NOT_CACHEABLE (0<<PAGE_CACHEABLE_SHIFT)
#define PAGE_CACHEABLE (1<<PAGE_CACHEABLE_SHIFT)
#define PAGE_NOT_CACHEABLE (0<<PAGE_CACHEABLE_SHIFT)
#define PAGE_CACHEABLE (1<<PAGE_CACHEABLE_SHIFT)
 
#define PAGE_PRESENT (0<<PAGE_PRESENT_SHIFT)
#define PAGE_NOT_PRESENT (1<<PAGE_PRESENT_SHIFT)
#define PAGE_PRESENT (0<<PAGE_PRESENT_SHIFT)
#define PAGE_NOT_PRESENT (1<<PAGE_PRESENT_SHIFT)
 
#define PAGE_USER (1<<PAGE_USER_SHIFT)
#define PAGE_KERNEL (0<<PAGE_USER_SHIFT)
#define PAGE_USER (1<<PAGE_USER_SHIFT)
#define PAGE_KERNEL (0<<PAGE_USER_SHIFT)
 
#define PAGE_READ (1<<PAGE_READ_SHIFT)
#define PAGE_WRITE (1<<PAGE_WRITE_SHIFT)