4 #include <minix/callnr.h>
6 #include <minix/config.h>
7 #include <minix/const.h>
9 #include <minix/endpoint.h>
10 #include <minix/keymap.h>
11 #include <minix/minlib.h>
12 #include <minix/type.h>
13 #include <minix/ipc.h>
14 #include <minix/sysutil.h>
15 #include <minix/syslib.h>
16 #include <minix/bitmap.h>
17 #include <sys/sigcontext.h>
27 #define DATA_CHANGED 1 /* flag value when data segment size changed */
28 #define STACK_CHANGED 2 /* flag value when stack size changed */
30 /*===========================================================================*
32 *===========================================================================*/
33 PUBLIC
int do_push_sig(message
*msg
)
40 ep
= msg
->VMPS_ENDPOINT
;
42 if((r
=vm_isokendpt(ep
, &n
)) != OK
) {
43 printf("VM: bogus endpoint %d from %d\n", ep
, msg
->m_source
);
48 if ((r
=get_stack_ptr(ep
, &sp
)) != OK
)
49 vm_panic("couldn't get new stack pointer (for sig)",r
);
51 /* Save old SP for caller */
52 msg
->VMPS_OLD_SP
= (char *) sp
;
54 /* Make room for the sigcontext and sigframe struct. */
55 sp
-= sizeof(struct sigcontext
)
56 + 3 * sizeof(char *) + 2 * sizeof(int);
58 if ((r
=adjust(vmp
, vmp
->vm_arch
.vm_seg
[D
].mem_len
, sp
)) != OK
) {
59 printf("VM: do_push_sig: adjust() failed: %d\n", r
);