Implement krnl_mutex_is_locked. Implement events based on mutexes