linux_machdep.c (a7ac45761335b1d514804cd0bfe44bdb2c3a3e0c) linux_machdep.c (4ab7403bbd76f466d482cd69035091c04e409c09)
1/*-
2 * Copyright (c) 2013 Dmitry Chagin
3 * Copyright (c) 2004 Tim J. Robbins
4 * Copyright (c) 2002 Doug Rabson
5 * Copyright (c) 2000 Marcel Moolenaar
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

426 return (EPERM);
427
428 pcb = td->td_pcb;
429 pcb->pcb_fsbase = (register_t)desc;
430 td->td_frame->tf_fs = _ufssel;
431
432 return (0);
433}
1/*-
2 * Copyright (c) 2013 Dmitry Chagin
3 * Copyright (c) 2004 Tim J. Robbins
4 * Copyright (c) 2002 Doug Rabson
5 * Copyright (c) 2000 Marcel Moolenaar
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

426 return (EPERM);
427
428 pcb = td->td_pcb;
429 pcb->pcb_fsbase = (register_t)desc;
430 td->td_frame->tf_fs = _ufssel;
431
432 return (0);
433}
434
435void
436linux_to_bsd_sigset(l_sigset_t *lss, sigset_t *bss)
437{
438 int b, l;
439
440 SIGEMPTYSET(*bss);
441 for (l = 1; l <= LINUX_NSIG; l++) {
442 if (LINUX_SIGISMEMBER(*lss, l)) {
443 if (l <= LINUX_SIGTBLSZ)
444 b = linux_to_bsd_signal[_SIG_IDX(l)];
445 else
446 b = l;
447 if (b)
448 SIGADDSET(*bss, b);
449 }
450 }
451}
452
453void
454bsd_to_linux_sigset(sigset_t *bss, l_sigset_t *lss)
455{
456 int b, l;
457
458 LINUX_SIGEMPTYSET(*lss);
459 for (b = 1; b <= LINUX_NSIG; b++) {
460 if (SIGISMEMBER(*bss, b)) {
461 if (b <= LINUX_SIGTBLSZ)
462 l = bsd_to_linux_signal[_SIG_IDX(b)];
463 else
464 l = b;
465 if (l)
466 LINUX_SIGADDSET(*lss, l);
467 }
468 }
469}