Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
#include <ureg.h>
4
 
5
int	__noterestore(void);
6
 
7
void
8
notejmp(void *vr, jmp_buf j, int ret)
9
{
10
	struct Ureg *r = vr;
11
 
12
	/*
13
	 * song and dance to get around the kernel smashing r3 in noted
14
	 */
15
	r->r4 = ret;
16
	if(ret == 0)
17
		r->r4 = 1;
18
	r->r5 = j[JMPBUFPC] - JMPBUFDPC;
19
	r->pc = (ulong)__noterestore;
20
	r->sp = j[JMPBUFSP];
21
	noted(NCONT);
22
}