Adding a System Call - Minix

This is a discussion on Adding a System Call - Minix ; Hello, I 've been trying to add a new system call to Minix3 following instructions from http://www.cis.syr.edu/~wedu/seed/Do...ystem_call.pdf but can't make it through.. It seems as a simple procedure ( at least the basic part).. First i add a new system ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Adding a System Call

  1. Adding a System Call

    Hello,

    I 've been trying to add a new system call to Minix3 following
    instructions from
    http://www.cis.syr.edu/~wedu/seed/Do...ystem_call.pdf
    but can't make it through..

    It seems as a simple procedure ( at least the basic part)..

    First i add a new system call handler in tables.c in an empty entry
    Then i update proto.h putting my function prototype under the misc.c
    group
    Finally i write the function definition in misc.c

    But when i try to compile the server ( PM for example ) i get the
    following error:


    "table.c, line 87: illegal initalization"

    Of course line 87 holds my function pointer.

    May someone inform me about the meaning of this error message?
    Thanks..


  2. Re: Adding a System Call

    paulogiann@gmail.com wrote:

    > "table.c, line 87: illegal initalization"


    > Of course line 87 holds my function pointer.


    > May someone inform me about the meaning of this error message?


    Yes, you performed an illegal initialization. Maybe you could show us this
    "line 87" as well as some of the relevant surrounding lines so we can see
    what the compiler is actually complaining about?

    Regards,

    Jens

    --
    Jens de Smit
    Student Computer Science | Vrije Universiteit Amsterdam
    jfdsmit@few.vu.nl | http://www.few.vu.nl/~jfdsmit
    "[In the end, people] get furious at IT that the goddamn magic isn't working"
    -- Stewart Dean

  3. Re: Adding a System Call

    On Mar 19, 10:22 am, "J.F. de Smit" wrote:
    > paulogi...@gmail.com wrote:
    >
    >
    >
    > > "table.c, line 87: illegal initalization"
    > > Of course line 87 holds my function pointer.
    > > May someone inform me about the meaning of this error message?

    >
    > Yes, you performed an illegal initialization. Maybe you could show us this
    > "line 87" as well as some of the relevant surrounding lines so we can see
    > what the compiler is actually complaining about?
    >
    > Regards,
    >
    > Jens
    >


    no_sys, /* 65 = UNPAUSE */
    no_sys, /* 66 = unused */
    no_sys, /* 67 = REVIVE */
    no_sys, /* 68 = TASK_REPLY */
    do_d(), /* 69 = unused */
    no_sys, /* 70 = unused */
    do_sigaction, /* 71 = sigaction */
    do_sigsuspend, /* 72 = sigsuspend */

    do_d() is supposed to be my function handler

    Thanks for the help

  4. Re: Adding a System Call

    On 03/19/08 11:14, paulogiann@gmail.com wrote:

    >>> "table.c, line 87: illegal initalization"
    >>> Of course line 87 holds my function pointer.
    >>> May someone inform me about the meaning of this error message?

    >> Yes, you performed an illegal initialization. Maybe you could show us this
    >> "line 87" as well as some of the relevant surrounding lines so we can see
    >> what the compiler is actually complaining about?


    >
    > no_sys, /* 65 = UNPAUSE */
    > no_sys, /* 66 = unused */
    > no_sys, /* 67 = REVIVE */
    > no_sys, /* 68 = TASK_REPLY */
    > do_d(), /* 69 = unused */
    > no_sys, /* 70 = unused */
    > do_sigaction, /* 71 = sigaction */
    > do_sigsuspend, /* 72 = sigsuspend */
    >
    > do_d() is supposed to be my function handler


    In the C language do_d() is supposed to be the call to the function.
    The table must be initialized with the pointer to the function
    entry-point as are the other entries.

    Ciao
    Giovanni
    --
    A computer is like an air conditioner,
    it stops working when you open Windows.
    Registered Linux user #337974 < http://giovanni.homelinux.net/ >

  5. Re: Adding a System Call

    On Mar 19, 6:38 pm, Giovanni wrote:
    > On 03/19/08 11:14, paulogi...@gmail.com wrote:
    >
    >
    >
    > >>> "table.c, line 87: illegal initalization"
    > >>> Of course line 87 holds my function pointer.
    > >>> May someone inform me about the meaning of this error message?
    > >> Yes, you performed an illegal initialization. Maybe you could show us this
    > >> "line 87" as well as some of the relevant surrounding lines so we can see
    > >> what the compiler is actually complaining about?

    >
    > > no_sys, /* 65 = UNPAUSE */
    > > no_sys, /* 66 = unused */
    > > no_sys, /* 67 = REVIVE */
    > > no_sys, /* 68 = TASK_REPLY */
    > > do_d(), /* 69 = unused */
    > > no_sys, /* 70 = unused */
    > > do_sigaction, /* 71 = sigaction */
    > > do_sigsuspend, /* 72 = sigsuspend */

    >
    > > do_d() is supposed to be my function handler

    >
    > In the C language do_d() is supposed to be the call to the function.
    > The table must be initialized with the pointer to the function
    > entry-point as are the other entries.
    >
    > Ciao
    > Giovanni
    > --
    > A computer is like an air conditioner,
    > it stops working when you open Windows.
    > Registered Linux user #337974



    hi
    just 'do_d' , not 'do_d()'

    i think the orignal author has some typos

    thanks

+ Reply to Thread