MCPcopy Create free account
hub / github.com/corosync/corosync / sam_hc_send

Function sam_hc_send

lib/sam.c:697–722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

695}
696
697cs_error_t sam_hc_send (void)
698{
699 char command;
700 cs_error_t ret;
701
702 ret = CS_OK;
703
704 pthread_mutex_lock (&sam_internal_data.lock);
705
706 if (sam_internal_data.internal_status != SAM_INTERNAL_STATUS_STARTED) {
707 ret = CS_ERR_BAD_HANDLE;
708 goto exit_mutex_unlock;
709 }
710
711 command = SAM_COMMAND_HB;
712
713 if (sam_safe_write (sam_internal_data.child_fd_out, &command, sizeof (command)) != sizeof (command)) {
714 ret = CS_ERR_LIBRARY;
715 goto exit_mutex_unlock;
716 }
717
718exit_mutex_unlock:
719 pthread_mutex_unlock (&sam_internal_data.lock);
720
721 return (ret);
722}
723
724cs_error_t sam_finalize (void)
725{

Callers 5

hc_callback_threadFunction · 0.85
test_basicsFunction · 0.85
test_signalFunction · 0.85
test_warn_signalFunction · 0.85
test_cmap_quitFunction · 0.85

Calls 1

sam_safe_writeFunction · 0.85

Tested by 4

test_basicsFunction · 0.68
test_signalFunction · 0.68
test_warn_signalFunction · 0.68
test_cmap_quitFunction · 0.68