mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Changing thread_info->task, does it harm?
@ 2005-08-14 12:41 Samer Sarhan
  2005-08-14 12:52 ` Arjan van de Ven
  2005-08-14 12:56 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Samer Sarhan @ 2005-08-14 12:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ahmed Mohamed Tarek

Hi,
I had a design problem of a Linux module (Linux 2.6.11) that lead me to do this:

int work_fn(void* data);
task_t my_task;
task_t* kthread = kthread_create(work_fn, NULL, "Task 1");
// assume kthread create was successfully...
my_task = *kthread;
// change what current maceo points to...
kthread->thread_info->task = &my_task;
...
...
wake_up_process(&my_task);
...
..

well... is it dangerous to change what current macro points to through
changing thread_info->task?

Please help!
Thanks for help in advance!
-- 
===========
Samer Sarhan.
"To understand recursion, you need to understand recursion."
http://samersarhan.blogspot.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-08-14 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-14 12:41 Changing thread_info->task, does it harm? Samer Sarhan
2005-08-14 12:52 ` Arjan van de Ven
2005-08-14 12:56 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®