Re: Threads
Posted: Mon Mar 29, 2010 12:12 pm
Christoph,
Sorry, I'll have to go edit the article. It should have mentioned that the point of creating the InitalizedWrapper() method (initialize_wrapper () in your code), was so you could declare it static in your .h file. It should look something like this:
We still need the first parameter to OSTaskCreate to be a static (or non-member function) but inside our wrapper is where we "trick" it into actually using a member function. Let me know if this works. I do actually use this technique in my code so it does work.
Tod
Sorry, I'll have to go edit the article. It should have mentioned that the point of creating the InitalizedWrapper() method (initialize_wrapper () in your code), was so you could declare it static in your .h file. It should look something like this:
Code: Select all
static void initialize_wrapper (void* const pTaskBase);
We still need the first parameter to OSTaskCreate to be a static (or non-member function) but inside our wrapper is where we "trick" it into actually using a member function. Let me know if this works. I do actually use this technique in my code so it does work.
Tod