mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
P-code BINFMT: Add logic to pass information from the binfmt logic to the P-code interpreter. This includes some extension to the binfmt interfaces.
This commit is contained in:
@@ -136,14 +136,27 @@ struct binary_s
|
||||
|
||||
uint8_t priority; /* Task execution priority */
|
||||
size_t stacksize; /* Size of the stack in bytes (unallocated) */
|
||||
|
||||
/* Unload module callback */
|
||||
|
||||
CODE int (*unload)(FAR struct binary_s *bin);
|
||||
};
|
||||
|
||||
/* This describes one binary format handler */
|
||||
|
||||
struct binfmt_s
|
||||
{
|
||||
FAR struct binfmt_s *next; /* Supports a singly-linked list */
|
||||
int (*load)(FAR struct binary_s *bin); /* Verify and load binary into memory */
|
||||
/* Supports a singly-linked list */
|
||||
|
||||
FAR struct binfmt_s *next;
|
||||
|
||||
/* Verify and load binary into memory */
|
||||
|
||||
CODE int (*load)(FAR struct binary_s *bin);
|
||||
|
||||
/* Unload module callback */
|
||||
|
||||
CODE int (*unload)(FAR struct binary_s *bin);
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
@@ -224,7 +237,7 @@ int load_module(FAR struct binary_s *bin);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int unload_module(FAR const struct binary_s *bin);
|
||||
int unload_module(FAR struct binary_s *bin);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: exec_module
|
||||
|
||||
+12
-12
@@ -47,7 +47,8 @@
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
@@ -126,17 +127,16 @@ struct timespec; /* Defined in time.h */
|
||||
|
||||
/* Counting Semaphore Interfaces (based on POSIX APIs) */
|
||||
|
||||
EXTERN int sem_init(FAR sem_t *sem, int pshared, unsigned int value);
|
||||
EXTERN int sem_destroy(FAR sem_t *sem);
|
||||
EXTERN FAR sem_t *sem_open(FAR const char *name, int oflag, ...);
|
||||
EXTERN int sem_close(FAR sem_t *sem);
|
||||
EXTERN int sem_unlink(FAR const char *name);
|
||||
EXTERN int sem_wait(FAR sem_t *sem);
|
||||
EXTERN int sem_timedwait(FAR sem_t *sem,
|
||||
FAR const struct timespec *abstime);
|
||||
EXTERN int sem_trywait(FAR sem_t *sem);
|
||||
EXTERN int sem_post(FAR sem_t *sem);
|
||||
EXTERN int sem_getvalue(FAR sem_t *sem, FAR int *sval);
|
||||
int sem_init(FAR sem_t *sem, int pshared, unsigned int value);
|
||||
int sem_destroy(FAR sem_t *sem);
|
||||
FAR sem_t *sem_open(FAR const char *name, int oflag, ...);
|
||||
int sem_close(FAR sem_t *sem);
|
||||
int sem_unlink(FAR const char *name);
|
||||
int sem_wait(FAR sem_t *sem);
|
||||
int sem_timedwait(FAR sem_t *sem, FAR const struct timespec *abstime);
|
||||
int sem_trywait(FAR sem_t *sem);
|
||||
int sem_post(FAR sem_t *sem);
|
||||
int sem_getvalue(FAR sem_t *sem, FAR int *sval);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user