nucconst.h


/*************************************************************************
*                                                                        *
*   Header: nucconst.h                                                   *
*                                                                        *
*   realizzato dal Gruppo 17 di Lab2 Anno Accademico 1995/96             *
*                                                                        *
*   Lorenzo     Claudio       Valerio    Riccardo    Emiliano            *
*   Coronati    Lanconelli    Paolini    Solmi       Trentini            *
*                                                                        *
**************************************************************************/
#ifndef _NUCCONST_H
#define _NUCCONST_H

#ifdef  NUC_DEBUG
#undef  HIDDEN
#define HIDDEN
#endif

extern start();

#define BEGINKERNEL     start
#define TIMESLICE       5000L
#define CLOCKINTERVAL   100000L
#define INFINITE        0x7FFFFFFF
#define DEVNO(addr)      (((int)(addr) - BEGINDEVREG) >> 4)
#define DISABLEINTR()  LDIM(0xff)
#define ENABLEINTR()    LDIM(0x00)

#define NODEVICES   16
#define MAXPRIO     8

#define NUCSTKSIZE  1
#define SSISTKSIZE  1
#define TSTSTKSIZE  1

/* servizi forniti da S.S.I. */
enum service {
    CREAPROC=1,
    TERMPROC,
    CREATHREAD,
    TERMTHREAD,
    SETPRGTRAP,
    SETMEMTRAP,
    SETSYSTRAP,
    WAITIO,
    WAITCLOCK,
    GETCPUTIME
};

/* chiamate di sistema */
enum syscall {
    MSGSEND=1,
    MSGRECV
};

#define DO_MSGSEND() SYS1()
#define DO_MSGRECV() SYS2()

/* possibili valori assunti da t_waitfrom */
#define ANYSENDER   0
#define ANYTRAP     -3
#define NOBODY      -1

#define EMPTYMSG    NULL

#define SENDTODEADTHR   (ZERODIV + 1)
#define RECVFROMDEADTHR (ZERODIV + 2)

#endif


[INDICE CODICE]