Rev 886 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
//=====================================================================
// 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_CODES_BASE
&& error
<FSF_ERR_CODES_BASE
+FSF_ERR_CODES_MAX
) {
strncpy(message
, fsf_msg
[error
-FSF_ERR_CODES_BASE
-1], size
);
} else return -1;
return 0;
}