Deleted Added
full compact
ia32_syscall.c (144971) ia32_syscall.c (151316)
1/*-
2 * Copyright (C) 1994, David Greenman
3 * Copyright (c) 1990, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the University of Utah, and William Jolitz.
8 *

--- 22 unchanged lines hidden (view full) ---

31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 */
37
38#include <sys/cdefs.h>
1/*-
2 * Copyright (C) 1994, David Greenman
3 * Copyright (c) 1990, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the University of Utah, and William Jolitz.
8 *

--- 22 unchanged lines hidden (view full) ---

31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 */
37
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/sys/amd64/ia32/ia32_syscall.c 144971 2005-04-12 23:18:54Z jhb $");
39__FBSDID("$FreeBSD: head/sys/amd64/ia32/ia32_syscall.c 151316 2005-10-14 12:43:47Z davidxu $");
40
41/*
42 * 386 Trap and System call handling
43 */
44
45#include "opt_clock.h"
46#include "opt_cpu.h"
47#include "opt_isa.h"

--- 48 unchanged lines hidden (view full) ---

96 struct proc *p = td->td_proc;
97 register_t orig_tf_rflags;
98 u_int sticks;
99 int error;
100 int narg;
101 u_int32_t args[8];
102 u_int64_t args64[8];
103 u_int code;
40
41/*
42 * 386 Trap and System call handling
43 */
44
45#include "opt_clock.h"
46#include "opt_cpu.h"
47#include "opt_isa.h"

--- 48 unchanged lines hidden (view full) ---

96 struct proc *p = td->td_proc;
97 register_t orig_tf_rflags;
98 u_int sticks;
99 int error;
100 int narg;
101 u_int32_t args[8];
102 u_int64_t args64[8];
103 u_int code;
104 ksiginfo_t ksi;
104
105 /*
106 * note: PCPU_LAZY_INC() can only be used if we can afford
107 * occassional inaccuracy in the count.
108 */
109 PCPU_LAZY_INC(cnt.v_syscall);
110
111 sticks = td->td_sticks;

--- 110 unchanged lines hidden (view full) ---

222 if ((callp->sy_narg & SYF_MPSAFE) == 0)
223 mtx_unlock(&Giant);
224
225 /*
226 * Traced syscall.
227 */
228 if (orig_tf_rflags & PSL_T) {
229 frame.tf_rflags &= ~PSL_T;
105
106 /*
107 * note: PCPU_LAZY_INC() can only be used if we can afford
108 * occassional inaccuracy in the count.
109 */
110 PCPU_LAZY_INC(cnt.v_syscall);
111
112 sticks = td->td_sticks;

--- 110 unchanged lines hidden (view full) ---

223 if ((callp->sy_narg & SYF_MPSAFE) == 0)
224 mtx_unlock(&Giant);
225
226 /*
227 * Traced syscall.
228 */
229 if (orig_tf_rflags & PSL_T) {
230 frame.tf_rflags &= ~PSL_T;
230 trapsignal(td, SIGTRAP, 0);
231 ksiginfo_init_trap(&ksi);
232 ksi.ksi_signo = SIGTRAP;
233 ksi.ksi_code = TRAP_TRACE;
234 ksi.ksi_addr = (void *)frame.tf_rip;
235 trapsignal(td, &ksi);
231 }
232
233 /*
234 * Handle reschedule and other end-of-syscall issues
235 */
236 userret(td, &frame, sticks);
237
238#ifdef KTRACE

--- 34 unchanged lines hidden ---
236 }
237
238 /*
239 * Handle reschedule and other end-of-syscall issues
240 */
241 userret(td, &frame, sticks);
242
243#ifdef KTRACE

--- 34 unchanged lines hidden ---