Navigation


Changeset 691:78b665400097 in freeDiameter for libfdcore/core.c


Ignore:
Timestamp:
Jan 20, 2011, 7:44:27 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Cleanup all pthread_cleanup_push / pop pairs so that pop is always called after push, or ASSERT(0) is some grave errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/core.c

    r689 r691  
    241241int fd_core_waitstartcomplete(void)
    242242{
     243        int ret = 0;
     244       
    243245        TRACE_ENTRY("");
    244246       
     
    246248        pthread_cleanup_push( fd_cleanup_mutex, &is_ready_mtx );
    247249       
    248         while (!is_ready) {
    249                 CHECK_POSIX( pthread_cond_wait( &is_ready_cnd, &is_ready_mtx ) );
     250        while (!ret && !is_ready) {
     251                CHECK_POSIX_DO( ret = pthread_cond_wait( &is_ready_cnd, &is_ready_mtx ), );
    250252        }
    251253       
     
    253255        CHECK_POSIX( pthread_mutex_unlock( &is_ready_mtx ) );
    254256       
    255         return 0;
     257        return ret;
    256258}
    257259
Note: See TracChangeset for help on using the changeset viewer.