The program_handler_add() mechanism relied on being used after the initialization of the program_handler (and the ctk) process but before entering the event handling. In Contiki 2.x there's no such explicit process initialization anymore - and the implicit asynchronous initialization runs after program_handler_add(). Therefore the initialization of the data structures modified by program_handler_add() had to be removed from that asynchronous process initialization. Instead C-langugae global data.initialization is used.
This commit is contained in:
parent
ad7bbcdf17
commit
d4a00f67fe
2 changed files with 4 additions and 11 deletions
|
@ -43,7 +43,7 @@
|
|||
*
|
||||
* This file is part of the Contiki desktop OS
|
||||
*
|
||||
* $Id: program-handler.c,v 1.1 2006/06/17 22:41:12 adamdunkels Exp $
|
||||
* $Id: program-handler.c,v 1.2 2006/08/15 00:11:45 oliverschmidt Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
|||
|
||||
|
||||
/* Menus */
|
||||
static struct ctk_menu contikimenu;
|
||||
static struct ctk_menu contikimenu = {NULL, "Contiki", 7, 0, 0};
|
||||
|
||||
#ifndef PROGRAM_HANDLER_CONF_MAX_NUMDSCS
|
||||
#define MAX_NUMDSCS 10
|
||||
|
@ -278,7 +278,6 @@ PROCESS_THREAD(program_handler_process, ev, data)
|
|||
PROCESS_BEGIN();
|
||||
|
||||
/* Create the menus */
|
||||
ctk_menu_new(&contikimenu, "Contiki");
|
||||
ctk_menu_add(&contikimenu);
|
||||
#if WITH_LOADER_ARCH
|
||||
runmenuitem = ctk_menuitem_add(&contikimenu, "Run program...");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue