There is perhaps no need to use spin lock - pthread mutexes have low overhead if no contention takes place, anyway. + replaced platform_spin with pthread_mutex in resource manager + document why resource manager is needed