dumping information from kernel! - Minix

This is a discussion on dumping information from kernel! - Minix ; Hi all, I was trying to dump out some messages from the kernel. in /usr/src/servers/is there is dmp_kernel.c in this file there is a procedure sendmask_dmp() and there is small portion of it as follows: for (rp = oldrp; rp ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: dumping information from kernel!

  1. dumping information from kernel!

    Hi all,

    I was trying to dump out some messages from the kernel. in
    /usr/src/servers/is there is dmp_kernel.c
    in this file there is a procedure sendmask_dmp() and there is small
    portion of it as follows:

    for (rp = oldrp; rp < END_PROC_ADDR; rp++) {
    if (isemptyp(rp)) continue;
    if (++n > 20) break;

    printf("%8s ", rp->p_name);
    if (proc_nr(rp) == IDLE) printf("(%2d) ", proc_nr(rp));
    else if (proc_nr(rp) < 0) printf("[%2d] ", proc_nr(rp));
    else printf(" %2d ", proc_nr(rp));

    for (j=proc_nr(BEG_PROC_ADDR); j if (isallowed(rp->p_sendmask, j)) printf(" 1 ");
    else printf(" 0 ");
    }
    printf("\n");
    }

    I could not find the function isallowed(rp->p_sendmask,j)) defined
    anywhere in the source code, also I could not find out the p_senmask()
    either. Does anyone knows about this issue?
    Any help would be appreciated.


  2. Re: dumping information from kernel!

    All,

    > I could not find the function isallowed(rp->p_sendmask,j)) defined
    > anywhere in the source code, also I could not find out the p_senmask()
    > either.
    >
    > Does anyone knows about this issue?
    > Any help would be appreciated.


    The sendmask thing has moved from the kernel process table to the
    privilege structure that each process has, but all user processes
    share. It's pointed to by p_priv in the kernel process table, and
    defined in priv.h. What was sendmask is called 's_ipc_to', and is
    initialized for user and system processes in table.c. (All user
    processes inherit it from 'init' in that table.)

    The piece of code that you pasted is surrounded by #if DEAD_CODE,
    and not compiled in - admittedly a bit confusing.

    =Ben



+ Reply to Thread