Annotation of xinu/sys/scount.c, revision 1.1.1.2

1.1       root        1: /* scount.c - scount */
                      2: 
                      3: #include <conf.h>
                      4: #include <kernel.h>
                      5: #include <sem.h>
                      6: 
1.1.1.2 ! root        7: extern struct  sentry  semaph[];
        !             8: 
1.1       root        9: /*------------------------------------------------------------------------
                     10:  *  scount  --  return a semaphore count
                     11:  *------------------------------------------------------------------------
                     12:  */
                     13: SYSCALL scount(sem)
                     14:        int     sem;
                     15: {
1.1.1.2 ! root       16: #ifdef DEBUG
        !            17:        dotrace("scount", &sem, 1);
        !            18: #endif
1.1       root       19:        if (isbadsem(sem) || semaph[sem].sstate==SFREE)
                     20:                return(SYSERR);
                     21:        return(semaph[sem].semcnt);
                     22: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.