Mercurial > hg > freeDiameter
comparison libfreeDiameter/dictionary.c @ 7:e5af94b04946
Added dispatch module and tests
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 04 Sep 2009 18:05:25 +0900 |
parents | bafb831ba688 |
children | 2db15632a63d |
comparison
equal
deleted
inserted
replaced
6:b0d377c79d80 | 7:e5af94b04946 |
---|---|
407 /* This is either a sentinel or unused (=emtpy) list, let's destroy it */ | 407 /* This is either a sentinel or unused (=emtpy) list, let's destroy it */ |
408 destroy_list( &obj->list[i] ); | 408 destroy_list( &obj->list[i] ); |
409 } | 409 } |
410 | 410 |
411 /* Unlink all elements from the dispatch list; they will be freed when callback is unregistered */ | 411 /* Unlink all elements from the dispatch list; they will be freed when callback is unregistered */ |
412 CHECK_POSIX_DO( pthread_rwlock_wrlock(&fd_disp_lock), /* continue */ ); | |
412 while (!FD_IS_LIST_EMPTY(&obj->disp_cbs)) { | 413 while (!FD_IS_LIST_EMPTY(&obj->disp_cbs)) { |
413 fd_list_unlink( obj->disp_cbs.next ); | 414 fd_list_unlink( obj->disp_cbs.next ); |
414 } | 415 } |
416 CHECK_POSIX_DO( pthread_rwlock_unlock(&fd_disp_lock), /* continue */ ); | |
415 | 417 |
416 /* Last, destroy the object */ | 418 /* Last, destroy the object */ |
417 free(obj); | 419 free(obj); |
418 } | 420 } |
419 | 421 |