task: Destroy check no waiting tasks

This patch updates task synchronization objects' destroy function so it checks
whether there are any tasks still waiting on it and returns error if there are.

Signed-off-by: Yuji Mano <yuji.mano@am.sony.com>
Acked-by: Kazunori Asayama <asayama@sm.sony.co.jp>
8 files changed