Subversion Repositories shark

Rev

Rev 1676 | Blame | Compare with Previous | Last modification | View Log | RSS feed

%----------------------------------------------------------------------------
\chapter{Errors and Exceptions}
\label{ch:Errors} \label{ch:Exceptions
}
%----------------------------------------------------------------------------

This appendix describes the errors and exceptions codes that can be
printed into the screen, returned by a functions into the the \texttt{errno}
variables or that the kernel can raise. These error constants are
included from the \texttt{errno.h} standard include file, and are
contained into the \texttt{bits/errno.h
} include file.

%----------------------------------------------------------------------------
\section{Abort codes}
%----------------------------------------------------------------------------

\begin{longtable}{|c|c|c|}
\hline Name & N.& Description \\ \hline
\hline none & 1 & Generic OSLib abortASIG\_DEFAULT\_ACTION \\
\hline ASIG\_DEFAULT\_ACTION & 2& The default handler of a signal has been executed \\
\hline ASIGINIT & 3 & Internal error in initializing signals (should never happens) \\
\hline AHEXC & 4 & a set\_exchandler\_XXX function has been executed. \\
\hline AARPFULL & 5 & ARP table full. \\
\hline
\end{longtable
}

%----------------------------------------------------------------------------
\section{Exceptions posted with kern\_raise}
%----------------------------------------------------------------------------

\begin{longtable}{|l|c|p{8cm}|}
\hline Name & N. & Description \\ \hline
\hline XDOUBLE\_EXCEPTION & 1 & Two exceptions has been raised. Currently not used \\
\hline XUNVALID\_KILL\_SHADOW & 2 & Called into the internal function task\_makefree because a task was killed while some other task shadow points to that task. \\
\hline XNOMORE\_CLEANUPS & 3 & Too many cleanups handlers has been used. Currently not used. \\
\hline XUNVALID\_TASK & 4 & The Registered Modules does not implement a primitive called by the task (usually happens when the user calls task\_delay or task\_sleep) \\
\hline XUNVALID\_GUEST & 5 & The Registered Modules does not handle correctly the guest tasks. Check the initfile. \\
\hline XNOMORE\_EVENTS & 6 & Too many OSLib events posted. The number of OSLib events posted is declared in \texttt{include/ll/sys/ll/event.h} into the constant \texttt{MAX\_EVENT}.\\
\hline XDEADLINE\_MISS & 7 & A Task missed its deadline.\\
\hline XWCET\_VIOLATION & 8 & A Task consumed more tha its declared WCET.\\
\hline XACTIVATION & 9 & A Sporadic task has been activated more frequently than declared.\\
\hline XMUTEX\_OWNER\_KILLED & 10 & A task is terminated while it owns a mutex.\\
\hline XSRP\_UNVALID\_LOCK & 11 & A task tried to lock a SRP mutex with a wrong preemption level, or a task tries to lock a SRP mutex already locked, or a task tries to lock a SRP mutex without declaring its preemption level.\\
\hline XUNVALID\_DUMMY\_OP & 12 & Someone tried to execute an operation on the dummy Scheduling Module.\\
\hline XUNVALID\_SS\_REPLENISH & 13 & Error in the Sporadic Server replenishments. Please look at \texttt{kernel/modules/ss.c}.\\
\hline XARP\_TABLE\_FULL & 14 & Arp table full. See \texttt{drivers/net/arp.c}.\\
\hline XNETBUFF\_INIT\_EXC & 15 & Network buffers error. See \texttt{drivers/net/netbuff.}.\\
\hline XNETBUFF\_GET\_EXC & 16 & Network buffers error. See \texttt{drivers/net/netbuff.}. \\
\hline XNETBUFF\_ALREADYFREE\_EXC & 17 & Network buffers error. See \texttt{drivers/net/netbuff.}. \\
\hline XNETBUFF\_RELEASE\_EXC & 18 & Network buffers error. See \texttt{drivers/net/netbuff.}. \\
\hline XUDP\_BADCHK\_EXC & 19 & UDP CRC check failed. \\
\hline
\end{longtable
}

%----------------------------------------------------------------------------
\section{POSIX error codes}
%----------------------------------------------------------------------------

The POSIX error codes have numbers form 1 to 125 and are listed into
\texttt{include/errno.h}.

%----------------------------------------------------------------------------
\section{S.Ha.R.K. error codes}
%----------------------------------------------------------------------------

\begin{longtable}{|c|c|p{8cm}|}
\hline Name & N. & Description\\ \hline
\hline EWRONG\_INT\_NO & 126 & Wrong int number passed to handler-set or handler\_remove.\\
\hline EUSED\_INT\_NO & 127 & Already used int number.\\
\hline EUNUSED\_INT\_NO & 128 & Int number not used.\\
\hline ETOOMUCH\_INITFUNC & 129 & Too much init functions posted. (Currently not used)\\
\hline ETOOMUCH\_EXITFUNC & 130 & Too much exit functions posted.\\
\hline ENO\_AVAIL\_TASK & 131 & Task limit reached. Up to TSSMax-1 tasks can be created. See include/ll/i386/tss-ctx.h and include/kernel/const.h\\
\hline ENO\_AVAIL\_SCHEDLEVEL & 132 & The Task Model passed with task\_create cannot be accepted by any scheduling module.\\
\hline ETASK\_CREATE & 133 & Error during task\_create.\\
\hline ENO\_AVAIL\_RESLEVEL & 134 & A Resource Model passed with task\_create cannot be accepted by any resource module.\\
\hline ENO\_GUARANTEE & 135 & The new task cannot be accepted by the Scheduling Modules\\
\hline ENO\_AVAIL\_STACK\_MEM & 136 & No space left to allocate the task stack.\\
\hline ENO\_AVAIL\_TSS & 137 & No TSS free. This error should never happen.\\
\hline EUNVALID\_KILL & 138 & The PID you tried to kill is not a task or has the NO\_KILL flag set.\\
\hline EUNVALID\_TASK\_ID & 139 & The PID passed to task\_activate is not correct.\\
\hline EUNVALID\_GROUP & 140 & Group 0 is not a valid group.\\
\hline EPORT\_NO\_MORE\_DESCR & 141 & HARTPORT: No more port descriptors available.\\
\hline EPORT\_NO\_MORE\_INTERF & 142 & HARTPORT: No more free port interfaces.\\
\hline EPORT\_INCOMPAT\_MESSAGE & 143 & HARTPORT: Incompatible message (Write on a read port or viceversa)\\
\hline EPORT\_ALREADY\_OPEN & 144 & HARTPORT: The port is already open.\\
\hline EPORT\_NO\_MORE\_HASHENTRY & 145 & HARTPORT: No more Hash entries to create a port.\\
\hline EPORT\_2\_CONNECT & 146 & HARTPORT: Error creating the port.\\
\hline EPORT\_UNSUPPORTED\_ACC & 147 & HARTPORT: Error in port\_connect.\\
\hline EPORT\_WRONG\_OP & 148 & HARTPORT: Wrong operation.\\
\hline EPORT\_WRONG\_TYPE & 149 & HARTPORT: Operation not supported by the port type.\\
\hline EPORT\_UNVALID\_DESCR & 150 & HARTPORT: Invalid port descriptor.\\
\hline ECAB\_UNVALID\_ID & 151 & CABS: Invalid CAB ID.\\
\hline ECAB\_CLOSED & 152 & CABS: CAB Closed.\\
\hline ECAB\_UNVALID\_MSG\_NUM & 153 & CABS: Invalid Message number.\\
\hline ECAB\_NO\_MORE\_ENTRY & 154 & CABS: No more entries.\\
\hline ECAB\_TOO\_MUCH\_MSG & 155 & CABS: Too much messages.\\
\hline
\end{longtable
}