binfmt/pcode.c
/****************************************************************************
 * Name: pcode_initialize
 *
 * Description:
 *   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
 *   0 (OK) is returned on success and a negated errno is returned on
 *   failure.
 *
 ****************************************************************************/
pcode_initialize
Description:
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
0 (OK) is returned on success and a negated errno is returned on
failure.
pcode_initialize Description : 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 0 ( OK ) is returned on success and a negated errno is returned on failure .
int pcode_initialize(void)
{
  int ret;
  sem_init(&g_pcode_handoff.exclsem, 0, 1);
  ret = pcode_mount_testfs();
  if (ret < 0)
    {
      bdbg("ERROR: Failed to mount test file system: %d\n", ret);
      return ret;
    }
  bvdbg("Registering P-Code Loader\n");
  ret = register_binfmt(&g_pcode_binfmt);
  if (ret != 0)
    {
      bdbg("Failed to register binfmt: %d\n", ret);
    }
  return ret;
}
int pcode_initialize ( void ) { int ret ; sem_init ( & g_pcode_handoff . exclsem , 0 , 1 ) ; ret = pcode_mount_testfs ( ) ; if ( ret < 0 ) { bdbg ( " \n " , ret ) ; return ret ; } bvdbg ( " \n " ) ; ret = register_binfmt ( & g_pcode_binfmt ) ; if ( ret != 0 ) { bdbg ( " \n " , ret ) ; } return ret ; }
Name: pcode_initialize
 Description:
   P-code support is built based on the configuration.
Name : pcode_initialize Description : P - code support is built based on the configuration .
/* Initialize globals */ /* Mount the test file system */ /* Register ourselves as a binfmt loader */