openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/systemd/1_242+AUTOINC+db2e367bfc-r0/git/src/journal/journal-file.c
int journal_file_enable_post_change_timer(JournalFile* f, sd_event* e, usec_t t)
{
    _cleanup_(sd_event_source_unrefp) sd_event_source* timer = NULL;
    int r;

    assert(f);
    assert_return(!f->post_change_timer, -EINVAL);
    assert(e);
    assert(t);

    r = sd_event_add_time(e, &timer, CLOCK_MONOTONIC, 0, 0, post_change_thunk,
                          f);
    if (r < 0)
        return r;

    r = sd_event_source_set_enabled(timer, SD_EVENT_OFF);
    if (r < 0)
        return r;

    f->post_change_timer = TAKE_PTR(timer);
    f->post_change_timer_period = t;

    return r;
}
/* Enable coalesced change posting in a timer on the provided sd_event instance
 */
Enable coalesced change posting in a timer on the provided sd_event instance
Enable coalesced change posting in a timer on the provided sd_event instance
int journal_file_enable_post_change_timer(JournalFile* f, sd_event* e, usec_t t)
{
    _cleanup_(sd_event_source_unrefp) sd_event_source* timer = NULL;
    int r;
    assert(f);
    assert_return(!f->post_change_timer, -EINVAL);
    assert(e);
    assert(t);
    r = sd_event_add_time(e, &timer, CLOCK_MONOTONIC, 0, 0, post_change_thunk,
                          f);
    if (r < 0)
        return r;
    r = sd_event_source_set_enabled(timer, SD_EVENT_OFF);
    if (r < 0)
        return r;
    f->post_change_timer = TAKE_PTR(timer);
    f->post_change_timer_period = t;
    return r;
}
int journal_file_enable_post_change_timer ( JournalFile * f , sd_event * e , usec_t t ) { _cleanup_ ( sd_event_source_unrefp ) sd_event_source * timer = NULL ; int r ; assert ( f ) ; assert_return ( ! f -> post_change_timer , - EINVAL ) ; assert ( e ) ; assert ( t ) ; r = sd_event_add_time ( e , & timer , CLOCK_MONOTONIC , 0 , 0 , post_change_thunk , f ) ; if ( r < 0 ) return r ; r = sd_event_source_set_enabled ( timer , SD_EVENT_OFF ) ; if ( r < 0 ) return r ; f -> post_change_timer = TAKE_PTR ( timer ) ; f -> post_change_timer_period = t ; return r ; }
Enable coalesced change posting in a timer on the provided sd_event instance
Enable coalesced change posting in a timer on the provided sd_event instance