[Partial] Build wasi-libc for Windows (#2338)

Build wasi-libc library on Windows since libuv may be not supported. This PR is a first step
to make it working, but there's still a number of changes to get it fully working.
This commit is contained in:
Marcin Kolny
2023-07-13 14:02:29 +01:00
committed by GitHub
parent 81f0371f63
commit 662e38e9b0
19 changed files with 428 additions and 139 deletions

View File

@ -326,6 +326,61 @@ os_cond_broadcast(korp_cond *cond)
return BHT_OK;
}
int
os_rwlock_init(korp_rwlock *lock)
{
assert(lock);
if (pthread_rwlock_init(lock, NULL) != BHT_OK)
return BHT_ERROR;
return BHT_OK;
}
int
os_rwlock_rdlock(korp_rwlock *lock)
{
assert(lock);
if (pthread_rwlock_rdlock(lock) != BHT_OK)
return BHT_ERROR;
return BHT_OK;
}
int
os_rwlock_wrlock(korp_rwlock *lock)
{
assert(lock);
if (pthread_rwlock_wrlock(lock) != BHT_OK)
return BHT_ERROR;
return BHT_OK;
}
int
os_rwlock_unlock(korp_rwlock *lock)
{
assert(lock);
if (pthread_rwlock_unlock(lock) != BHT_OK)
return BHT_ERROR;
return BHT_OK;
}
int
os_rwlock_destroy(korp_rwlock *lock)
{
assert(lock);
if (pthread_rwlock_destroy(lock) != BHT_OK)
return BHT_ERROR;
return BHT_OK;
}
int
os_thread_join(korp_tid thread, void **value_ptr)
{