obsolete/locks.c
int __unmark_all_locks_for_obj( JIMP_obj obj, JIMP_thread_s *own_thread ) {

	JIMP_lock *l, *p;
	int n_locks, ret_nlock;

	p = (JIMP_lock *)&(own_thread->lock);
	l = p->next;
	
	while( l ){
	  if(l->obj_ref == obj) {
	    ret_nlock = n_locks = l->n_times_locked;
	    while( n_locks > 0 ) { n_locks--; __thread_unlock_nr( l->obj_ref, own_thread );}
		
	   /* Mark locks unlocked */	
		l->n_times_locked = -ret_nlock;
		return ret_nlock;
	  }
	  p = (JIMP_lock *)&(own_thread->lock);
	  l = p->next;
	}
	return 0;
}
/* Unmark all locks for obj object locked by this thread but do not remove */
Unmark all locks for obj object locked by this thread but do not remove
Unmark all locks for obj object locked by this thread but do not remove
int __unmark_all_locks_for_obj( JIMP_obj obj, JIMP_thread_s *own_thread ) {
	JIMP_lock *l, *p;
	int n_locks, ret_nlock;
	p = (JIMP_lock *)&(own_thread->lock);
	l = p->next;
	while( l ){
	  if(l->obj_ref == obj) {
	    ret_nlock = n_locks = l->n_times_locked;
	    while( n_locks > 0 ) { n_locks--; __thread_unlock_nr( l->obj_ref, own_thread );}
		l->n_times_locked = -ret_nlock;
		return ret_nlock;
	  }
	  p = (JIMP_lock *)&(own_thread->lock);
	  l = p->next;
	}
	return 0;
}
int __unmark_all_locks_for_obj ( JIMP_obj obj , JIMP_thread_s * own_thread ) { JIMP_lock * l , * p ; int n_locks , ret_nlock ; p = ( JIMP_lock * ) & ( own_thread -> lock ) ; l = p -> next ; while ( l ) { if ( l -> obj_ref == obj ) { ret_nlock = n_locks = l -> n_times_locked ; while ( n_locks > 0 ) { n_locks -- ; __thread_unlock_nr ( l -> obj_ref , own_thread ) ; } l -> n_times_locked = - ret_nlock ; return ret_nlock ; } p = ( JIMP_lock * ) & ( own_thread -> lock ) ; l = p -> next ; } return 0 ; }
Unmark all locks for obj object locked by this thread but do not remove
Unmark all locks for obj object locked by this thread but do not remove
/* Mark locks unlocked */