diff --git a/include/nuttx/binfmt/pcode.h b/include/nuttx/binfmt/pcode.h index 67136094dc..7c6b6b3606 100644 --- a/include/nuttx/binfmt/pcode.h +++ b/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 - * - * 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 * * 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 -#include /**************************************************************************** * 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 */