WIP: Unlock Notification

To be tested
This commit is contained in:
gwenn 2017-09-21 20:19:23 +02:00
parent 455e7d4060
commit 154a70d41b

View File

@ -40,14 +40,12 @@ impl UnlockNotification {
/// This function is an unlock-notify callback /// This function is an unlock-notify callback
#[cfg(feature = "unlock_notify")] #[cfg(feature = "unlock_notify")]
unsafe extern "C" fn unlock_notify_cb(ap_arg: *mut *mut c_void, n_arg: c_int) { unsafe extern "C" fn unlock_notify_cb(ap_arg: *mut *mut c_void, n_arg: c_int) {
/*int i; use std::slice::from_raw_parts;
for(i=0; i<nArg; i++){ let args = from_raw_parts(ap_arg, n_arg as usize);
UnlockNotification *p = (UnlockNotification *)apArg[i]; for arg in args {
pthread_mutex_lock(&p->mutex); let un: &mut UnlockNotification = &mut *(*arg as *mut UnlockNotification);
p->fired = 1; un.fired();
pthread_cond_signal(&p->cond); }
pthread_mutex_unlock(&p->mutex);
}*/
} }
/// This function assumes that an SQLite API call (either `sqlite3_prepare_v2()` /// This function assumes that an SQLite API call (either `sqlite3_prepare_v2()`