[pthread] rwlock_destroy(), rwlock_init() and rwlock_wrlock()

This commit is contained in:
Jesús Leganés-Combarro 'piranna 2019-05-19 19:16:04 +02:00
parent b1fa60e44a
commit ad8178bb2a
3 changed files with 27 additions and 0 deletions

View File

@ -52,6 +52,18 @@
- **\_pthread_key_create**     [:top:](#host-apis)
```rust
```
- **\_pthread_rwlock_destroy**     [:top:](#host-apis)
```rust
```
- **\_pthread_rwlock_init**     [:top:](#host-apis)
```rust
```
- **\_pthread_rwlock_wrlock**     [:top:](#host-apis)
```rust
```
- **\_pthread_setspecific**     [:top:](#host-apis)
```rust

View File

@ -105,6 +105,18 @@ pub fn _pthread_key_create(_ctx: &mut Ctx, _a: i32, _b: i32) -> i32 {
debug!("emscripten::_pthread_key_create");
0
}
pub fn _pthread_rwlock_destroy(_ctx: &mut Ctx, _rwlock: i32) -> i32 {
debug!("emscripten::_pthread_rwlock_destroy({})", _rwlock);
0
}
pub fn _pthread_rwlock_init(_ctx: &mut Ctx, _rwlock: i32, _attr: i32) -> i32 {
debug!("emscripten::_pthread_rwlock_init({}, {})", _rwlock, _attr);
0
}
pub fn _pthread_rwlock_wrlock(_ctx: &mut Ctx, _rwlock: i32) -> i32 {
debug!("emscripten::_pthread_rwlock_wrlock({})", _rwlock);
0
}
pub fn _pthread_create(_ctx: &mut Ctx, _a: i32, _b: i32, _c: i32, _d: i32) -> i32 {
debug!("emscripten::_pthread_create");
0

View File

@ -772,6 +772,9 @@ pub fn generate_emscripten_env(globals: &mut EmscriptenGlobals) -> ImportObject
"_pthread_setspecific" => func!(crate::emscripten_target::_pthread_setspecific),
"_pthread_once" => func!(crate::emscripten_target::_pthread_once),
"_pthread_key_create" => func!(crate::emscripten_target::_pthread_key_create),
"_pthread_rwlock_destroy" => func!(crate::emscripten_target::_pthread_rwlock_destroy),
"_pthread_rwlock_init" => func!(crate::emscripten_target::_pthread_rwlock_init),
"_pthread_rwlock_wrlock" => func!(crate::emscripten_target::_pthread_rwlock_wrlock),
"___gxx_personality_v0" => func!(crate::emscripten_target::___gxx_personality_v0),
"_getdtablesize" => func!(crate::emscripten_target::_getdtablesize),
"_gethostbyaddr" => func!(crate::emscripten_target::_gethostbyaddr),