Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 885 → Rev 886

/shark/trunk/ports/first/first-error.c
0,0 → 1,49
//=====================================================================
// FFFFFFIII RRRRR SSTTTTTTT
// FF IIR RR SS
// FF IR SS
// FFFFFF RRRR SSSSST
// FF FI RRR SS
// FF II RRR SS
// FF IIIIIR RS
//
// Basic FSF(FIRST Scheduling Framework) contract management
// S.Ha.R.K. Implementation
//=====================================================================
 
#include "fsf.h"
#include <string.h>
static char *fsf_msg[]={
"Too Many Task",
"Bad argument",
"Invalid synch object handle",
"No renegotiation request",
"Contract rejected",
"Not scheduled calling thread",
"Unbound error",
"Unknown application scheduled thread",
"No contracted server",
"Not scheduled thread",
"Too many service jobs",
"Too many synch object",
"Too many servers in synch object",
"Too many events in synch object",
"FSF internal error",
"Too many servers",
"Invalid scheduler reply",
"Too many many pending replenishments",
"System already initialized",
"Shared object already initialized",
"Shared object not initizialized",
"Scheduling policy not compatible",
};
 
int fsf_strerror (int error, char *message, size_t size)
{
if (error>FSF_ERR_BASE && error<FSF_ERR_BASE+FSF_ERR_MAX) {
strncpy(message, fsf_msg[error-FSF_ERR_BASE-1], size);
} else return -1;
return 0;
}