blob: c88e64def6f242df9b57274edbf8831677277e9b [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Copyright 2003 PathScale, Inc.
3 *
4 * Licensed under the GPL
5 */
6
7#include <stdio.h>
8#include <string.h>
9#include <signal.h>
10#include "user.h"
11
12void sc_to_sc(void *to_ptr, void *from_ptr)
13{
14 struct sigcontext *to = to_ptr, *from = from_ptr;
15 int size = sizeof(*to); /* + sizeof(struct _fpstate); */
16
17 memcpy(to, from, size);
18 if(from->fpstate != NULL)
19 to->fpstate = (struct _fpstate *) (to + 1);
20
21 to->fpstate = NULL;
22}
23
24unsigned long *sc_sigmask(void *sc_ptr)
25{
26 struct sigcontext *sc = sc_ptr;
27
28 return(&sc->oldmask);
29}
30
31/* Overrides for Emacs so that we follow Linus's tabbing style.
32 * Emacs will notice this stuff at the end of the file and automatically
33 * adjust the settings for this buffer only. This must remain at the end
34 * of the file.
35 * ---------------------------------------------------------------------------
36 * Local variables:
37 * c-file-style: "linux"
38 * End:
39 */