Changeset 2bb8648 in mainline for generic/src/ipc/sysipc.c


Ignore:
Timestamp:
2006-05-07T15:21:11Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
31282f9
Parents:
ecf3722
Message:

Add SYS_CAP_GRANT and SYS_CAP_REVOKE syscalls.
Move SYS_PREEMPT_CONTROL to ddi.c.
Add some comments and fix some small issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/ipc/sysipc.c

    recf3722 r2bb8648  
    4040#include <print.h>
    4141#include <syscall/copy.h>
     42#include <security/cap.h>
    4243
    4344#define GET_CHECK_PHONE(phone,phoneid,err) { \
     
    491492__native sys_ipc_register_irq(__native irq, irq_code_t *ucode)
    492493{
     494        if (!(cap_get(TASK) & CAP_IRQ_REG))
     495                return EPERM;
     496
    493497        if (irq >= IRQ_COUNT)
    494                 return -ELIMIT;
     498                return (__native) ELIMIT;
    495499
    496500        irq_ipc_bind_arch(irq);
     
    502506__native sys_ipc_unregister_irq(__native irq)
    503507{
     508        if (!(cap_get(TASK) & CAP_IRQ_REG))
     509                return EPERM;
     510
    504511        if (irq >= IRQ_COUNT)
    505                 return -ELIMIT;
     512                return (__native) ELIMIT;
    506513
    507514        ipc_irq_unregister(&TASK->answerbox, irq);
Note: See TracChangeset for help on using the changeset viewer.