Files
CgeThread/posix/Codemap.h

30 lines
509 B
C
Raw Normal View History

2026-08-09 12:55:16 +03:00
#ifndef CGE_THREAD_CODEMAP_H
#define CGE_THREAD_CODEMAP_H
#include "Internal.h"
#include <errno.h>
static int errorToErrorCode(int value) {
switch (value) {
case 0:
return CGE_THREAD_EOK;
case ENOMEM:
return CGE_THREAD_EOOM;
case EINVAL:
return CGE_THREAD_EINVAL;
case ETIMEDOUT:
return CGE_THREAD_ETIMEDOUT;
case EBUSY:
return CGE_THREAD_EBUSY;
default:
return CGE_THREAD_EUNKNOWN;
}
}
#endif /* CGE_THREAD_CODEMAP_H */