mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 10:56:37 +00:00
lib: Fix thread_execute_crash
With the change to have thread_get fill inthe ->hist pointer, thread_execute was missed and it needs to fill in the .hist pointer for the dummy thread created. I'm not really sure why we need to call a thread_execute on a function. When we could, you know, just call the bloody thing. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
7667c5568f
commit
c8ff19f7be
@ -1490,6 +1490,7 @@ funcname_thread_execute (struct thread_master *m,
|
|||||||
int val,
|
int val,
|
||||||
debugargdef)
|
debugargdef)
|
||||||
{
|
{
|
||||||
|
struct cpu_thread_history tmp;
|
||||||
struct thread dummy;
|
struct thread dummy;
|
||||||
|
|
||||||
memset (&dummy, 0, sizeof (struct thread));
|
memset (&dummy, 0, sizeof (struct thread));
|
||||||
@ -1497,11 +1498,14 @@ funcname_thread_execute (struct thread_master *m,
|
|||||||
dummy.type = THREAD_EVENT;
|
dummy.type = THREAD_EVENT;
|
||||||
dummy.add_type = THREAD_EXECUTE;
|
dummy.add_type = THREAD_EXECUTE;
|
||||||
dummy.master = NULL;
|
dummy.master = NULL;
|
||||||
dummy.func = func;
|
|
||||||
dummy.arg = arg;
|
dummy.arg = arg;
|
||||||
dummy.u.val = val;
|
dummy.u.val = val;
|
||||||
|
|
||||||
dummy.funcname = funcname;
|
tmp.func = dummy.func = func;
|
||||||
|
tmp.funcname = dummy.funcname = funcname;
|
||||||
|
dummy.hist = hash_get (cpu_record, &tmp,
|
||||||
|
(void * (*) (void *))cpu_record_hash_alloc);
|
||||||
|
|
||||||
dummy.schedfrom = schedfrom;
|
dummy.schedfrom = schedfrom;
|
||||||
dummy.schedfrom_line = fromln;
|
dummy.schedfrom_line = fromln;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user