base-codezero: initialize 'exregs_data' objects

Fixes #651.
This commit is contained in:
Christian Prochaska 2013-02-15 22:34:01 +01:00 committed by Norman Feske
parent 2a9a653b2b
commit 0a2e8909ee
2 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,7 @@ int Platform_thread::start(void *ip, void *sp, unsigned int cpu_no)
/* setup thread context */
struct exregs_data exregs;
exregs.flags = 0;
memset(&exregs, 0, sizeof(exregs));
exregs_set_stack(&exregs, (unsigned long)sp);
exregs_set_pc (&exregs, (unsigned long)ip);
exregs_set_pager(&exregs, pager.tid);

View File

@ -67,6 +67,7 @@ inline int create_thread(unsigned space_no,
/* setup thread context */
struct exregs_data exregs;
memset(&exregs, 0, sizeof(exregs));
exregs_set_stack(&exregs, (unsigned long)sp);
exregs_set_pc (&exregs, (unsigned long)ip);
exregs_set_pager(&exregs, pager_tid);