#include "ldp_struct.h" #include "ldp_mm_impl.h" #include "ldp_lock_impl.h" #include ldp_bool ldp_lock_handle_verify(ldp_lock_handle handle) { return LDP_TRUE; } ldp_lock_handle ldp_lock_create(ldp_lock_key_type key) { int *i = malloc(sizeof(int)); *i = 0; return i; } void ldp_lock_get(ldp_lock_handle handle) { assert(*handle == 0); // fprintf(stderr,"lock get\n"); (*handle)++; } void ldp_lock_release(ldp_lock_handle handle) { assert(*handle == 1); // fprintf(stderr,"lock release\n"); (*handle)--; } void ldp_lock_delete(ldp_lock_handle handle) { free(handle); }