Safer implementation of thread wakeup.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_2.6.x@5910 35acf78f-673a-0410-8e92-d51de3d6d3f4