diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-05-08 11:11:44 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-05-08 11:11:44 -0600 |
commit | b8e0f8452a406d1b545c282b2715f6fb17a5b329 (patch) | |
tree | ca96193662fe6ec85ff2f7b12c3390f8e45ee4a4 | |
parent | 3b785276e679bc8be4cb3046d757fb6caa40927d (diff) | |
download | nuttx-b8e0f8452a406d1b545c282b2715f6fb17a5b329.tar.gz nuttx-b8e0f8452a406d1b545c282b2715f6fb17a5b329.tar.bz2 nuttx-b8e0f8452a406d1b545c282b2715f6fb17a5b329.zip |
Corrected pcode.h header file
-rw-r--r-- | nuttx/include/nuttx/binfmt/pcode.h | 107 |
1 files changed, 15 insertions, 92 deletions
diff --git a/nuttx/include/nuttx/binfmt/pcode.h b/nuttx/include/nuttx/binfmt/pcode.h index 67136094d..7c6b6b360 100644 --- a/nuttx/include/nuttx/binfmt/pcode.h +++ b/nuttx/include/nuttx/binfmt/pcode.h @@ -1,14 +1,7 @@ /**************************************************************************** - * include/nuttx/binfmt/builtin.h + * include/nuttx/binfmt/pcode.h * - * Originally by: - * - * Copyright (C) 2011 Uros Platise. All rights reserved. - * Author: Uros Platise <uros.platise@isotel.eu> - * - * With subsequent updates, modifications, and general maintenance by: - * - * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -40,35 +33,27 @@ * ****************************************************************************/ -#ifndef __INCLUDE_NUTTX_BINFMT_BUILTIN_H -#define __INCLUDE_NUTTX_BINFMT_BUILTIN_H +#ifndef __INCLUDE_NUTTX_BINFMT_PCODE_H +#define __INCLUDE_NUTTX_BINFMT_PCODE_H /**************************************************************************** * Included Files ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> /**************************************************************************** * Public Types ****************************************************************************/ -struct builtin_s -{ - const char *name; /* Invocation name and as seen under /sbin/ */ - int priority; /* Use: SCHED_PRIORITY_DEFAULT */ - int stacksize; /* Desired stack size */ - main_t main; /* Entry point: main(int argc, char *argv[]) */ -}; - /**************************************************************************** * Public Data ****************************************************************************/ #if defined(__cplusplus) #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif @@ -78,12 +63,12 @@ extern "C" { ****************************************************************************/ /**************************************************************************** - * Name: builtin_initialize + * Name: pcode_initialize * * Description: - * Builtin support is built unconditionally. However, in order to - * use this binary format, this function must be called during system - * format in order to register the builtin binary format. + * P-code support is built based on the configuration. However, in order + * to use this binary format, this function must be called during system + * initialization in order to register the P-Code binary format. * * Returned Value: * This is a NuttX internal function so it follows the convention that @@ -92,87 +77,25 @@ extern "C" { * ****************************************************************************/ -int builtin_initialize(void); +int pcode_initialize(void); /**************************************************************************** - * Name: builtin_uninitialize + * Name: pcode_uninitialize * * Description: - * Unregister the builtin binary loader + * Unregister the pcode binary loader * * Returned Value: * None * ****************************************************************************/ -void builtin_uninitialize(void); - -/**************************************************************************** - * Utility Functions Provided to Applications by binfmt/libbuiltin - ****************************************************************************/ -/**************************************************************************** - * Name: builtin_isavail - * - * Description: - * Checks for availabiliy of application registerred during compile time. - * - * Input Parameter: - * filename - Name of the linked-in binary to be started. - * - * Returned Value: - * This is an end-user function, so it follows the normal convention: - * Returns index of builtin application. If it is not found then it - * returns -1 (ERROR) and sets errno appropriately. - * - ****************************************************************************/ - -int builtin_isavail(FAR const char *appname); - -/**************************************************************************** - * Name: builtin_getname - * - * Description: - * Returns pointer to a name of built-in application pointed by the - * index. - * - * Input Parameter: - * index, from 0 and on ... - * - * Returned Value: - * Returns valid pointer pointing to the app name if index is valid. - * Otherwise NULL is returned. - * - ****************************************************************************/ - -FAR const char *builtin_getname(int index); - -/**************************************************************************** - * Data Set Access Functions Provided to Applications by binfmt/libbuiltin - ****************************************************************************/ -/**************************************************************************** - * Name: builtin_for_index - * - * Description: - * Returns the builtin_s structure for the selected builtin. - * If support for builtin functions is enabled in the NuttX configuration, - * then this function must be provided by the application code. - * - * Input Parameter: - * index, from 0 and on... - * - * Returned Value: - * Returns valid pointer pointing to the builtin_s structure if index is - * valid. - * Otherwise, NULL is returned. - * - ****************************************************************************/ - -EXTERN FAR const struct builtin_s *builtin_for_index(int index); +void pcode_uninitialize(void); #undef EXTERN #if defined(__cplusplus) } #endif -#endif /* __INCLUDE_NUTTX_BINFMT_BUILTIN_H */ +#endif /* __INCLUDE_NUTTX_BINFMT_PCODE_H */ |