
- Currently the cpu time quantum is timer-ticks based. Thus the remaining quantum is decreased only if the processes is interrupted by a timer tick. As processes block a lot this typically does not happen for normal user processes. Also the quantum depends on the frequency of the timer. - This change makes the quantum miliseconds based. Internally the miliseconds are translated into cpu cycles. Everytime userspace execution is interrupted by kernel the cycles just consumed by the current process are deducted from the remaining quantum. - It makes the quantum system timer frequency independent. - The boot processes quantum is loosely derived from the tick-based quantas and 60Hz timer and subject to future change - the 64bit arithmetics is a little ugly, will be changes once we have compiler support for 64bit integers (soon)
42 lines
1.2 KiB
C
42 lines
1.2 KiB
C
/* minix/u64.h Author: Kees J. Bot
|
|
* 7 Dec 1995
|
|
* Functions to manipulate 64 bit disk addresses.
|
|
*/
|
|
#ifndef _MINIX__U64_H
|
|
#define _MINIX__U64_H
|
|
|
|
#ifndef _TYPES_H
|
|
#include <minix/types.h>
|
|
#endif
|
|
|
|
u64_t add64(u64_t i, u64_t j);
|
|
u64_t add64u(u64_t i, unsigned j);
|
|
u64_t add64ul(u64_t i, unsigned long j);
|
|
u64_t sub64(u64_t i, u64_t j);
|
|
u64_t sub64u(u64_t i, unsigned j);
|
|
u64_t sub64ul(u64_t i, unsigned long j);
|
|
int bsr64(u64_t i);
|
|
unsigned diff64(u64_t i, u64_t j);
|
|
u64_t cvu64(unsigned i);
|
|
u64_t cvul64(unsigned long i);
|
|
unsigned cv64u(u64_t i);
|
|
unsigned long cv64ul(u64_t i);
|
|
u64_t div64(u64_t i, u64_t j);
|
|
unsigned long div64u(u64_t i, unsigned j);
|
|
u64_t div64u64(u64_t i, unsigned j);
|
|
u64_t rem64(u64_t i, u64_t j);
|
|
unsigned rem64u(u64_t i, unsigned j);
|
|
u64_t mul64(u64_t i, u64_t j);
|
|
u64_t mul64u(unsigned long i, unsigned j);
|
|
int cmp64(u64_t i, u64_t j);
|
|
int cmp64u(u64_t i, unsigned j);
|
|
int cmp64ul(u64_t i, unsigned long j);
|
|
unsigned long ex64lo(u64_t i);
|
|
unsigned long ex64hi(u64_t i);
|
|
u64_t make64(unsigned long lo, unsigned long hi);
|
|
|
|
#define is_zero64(i) ((i).lo == 0 && (i).hi == 0)
|
|
#define make_zero64(i) do { (i).lo = (i).hi = 0; } while(0)
|
|
|
|
#endif /* _MINIX__U64_H */
|