Commit 28c4ac1a authored by julien.delange's avatar julien.delange
Browse files

* ping example now works on top of XENOMAI_POSIX



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@2369 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 7607009c
......@@ -230,8 +230,9 @@ void* __po_hi_sockets_poller (void)
}
}
}
__DEBUGMSG ("[DRIVER SOCKETS] Poller initialization finished\n");
__DEBUGMSG ("[DRIVER SOCKETS] Poller initialization finished, waiting for other tasks\n");
__po_hi_wait_initialization ();
__DEBUGMSG ("[DRIVER SOCKETS] Other tasks are initialized, let's start the polling !\n");
/*
* Then, listen and receive data on the socket, identify the node
......
......@@ -107,16 +107,7 @@ int __po_hi_initialize_early ()
* for the initialization of the other tasks.
*/
#endif
return (__PO_HI_SUCCESS);
}
/*
* The __po_hi_initialize function is only called
* by the main thread (the one that executes the traditional
* main() function.
*/
int __po_hi_initialize ()
{
#if defined (POSIX) || defined (RTEMS_POSIX) || defined (XENO_POSIX)
pthread_mutexattr_t mutex_attr;
if (pthread_mutexattr_init (&mutex_attr) != 0)
......@@ -198,6 +189,17 @@ int __po_hi_initialize ()
__po_hi_protected_init();
#endif
return (__PO_HI_SUCCESS);
}
/*
* The __po_hi_initialize function is only called
* by the main thread (the one that executes the traditional
* main() function.
*/
int __po_hi_initialize ()
{
return (__PO_HI_SUCCESS);
}
......@@ -217,6 +219,7 @@ int __po_hi_wait_initialization ()
if (pthread_mutex_lock (&mutex_init) != 0)
{
__DEBUGMSG ("[MAIN] Unable to lock the mutex\n");
return (__PO_HI_ERROR_PTHREAD_MUTEX);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment