plan 9 kernel history: overview | file list | diff list

1992/0122/gnot/main.c (diff list | history)

1991/1114/sys/src/9/gnot/main.c:303,3151992/0122/sys/src/9/gnot/main.c:303,312 (short | long | prev | next)
1990/1211    
 * Save the part of the process state. 
 */ 
void 
1990/1212    
procsave(uchar *state, int len) 
1992/0122    
procsave(Proc *p) 
1990/1211    
{ 
	Balu *balu; 
1992/0122    
	Balu *balu = (Balu *)u->balusave; 
1990/1211    
 
	if(len < sizeof(Balu)) 
		panic("save state too small"); 
	balu = (Balu *)state; 
	fpsave(&u->fpsave); 
	if(u->fpsave.type){ 
		if(u->fpsave.size > sizeof u->fpsave.junk) 
1991/1114/sys/src/9/gnot/main.c:332,3421992/0122/sys/src/9/gnot/main.c:329,338
1990/1212    
 *  Procsave() makes sure that what state points to is long enough 
1990/1211    
 */ 
void 
1990/1212    
procrestore(Proc *p, uchar *state) 
1992/0122    
procrestore(Proc *p) 
1990/1211    
{ 
	Balu *balu; 
1992/0122    
	Balu *balu = (Balu *)u->balusave; 
1990/1211    
 
	balu = (Balu *)state; 
	if(p->fpstate != m->fpstate){ 
		if(p->fpstate == FPinit){ 
			u->p->fpstate = FPinit; 
1991/1114/sys/src/9/gnot/main.c:349,3551992/0122/sys/src/9/gnot/main.c:345,351
1990/1211    
		} 
	} 
	if(balu->cr0 != 0xFFFFFFFF)	/* balu busy */ 
1991/0318    
		memmove(BALU, balu, sizeof balu); 
1992/0122    
		memmove(BALU, balu, sizeof BALU); 
1991/0605    
} 
 
void 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)