votequorum_dispatch.3.in 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. .\"/*
  2. .\" * Copyright (c) 2009 Red Hat, Inc.
  3. .\" *
  4. .\" * All rights reserved.
  5. .\" *
  6. .\" * Author: Christine Caulfield <ccaulfie@redhat.com>
  7. .\" *
  8. .\" * This software licensed under BSD license, the text of which follows:
  9. .\" *
  10. .\" * Redistribution and use in source and binary forms, with or without
  11. .\" * modification, are permitted provided that the following conditions are met:
  12. .\" *
  13. .\" * - Redistributions of source code must retain the above copyright notice,
  14. .\" * this list of conditions and the following disclaimer.
  15. .\" * - Redistributions in binary form must reproduce the above copyright notice,
  16. .\" * this list of conditions and the following disclaimer in the documentation
  17. .\" * and/or other materials provided with the distribution.
  18. .\" * - Neither the name of the MontaVista Software, Inc. nor the names of its
  19. .\" * contributors may be used to endorse or promote products derived from this
  20. .\" * software without specific prior written permission.
  21. .\" *
  22. .\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  23. .\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  24. .\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  25. .\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  26. .\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  27. .\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  28. .\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  29. .\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  30. .\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  31. .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  32. .\" * THE POSSIBILITY OF SUCH DAMAGE.
  33. .\" */
  34. .TH VOTEQUORUM_DISPATCH 3 2009-01-26 "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
  35. .SH NAME
  36. votequorum_dispatch \- Dispatches callbacks from the votequorum service
  37. .SH SYNOPSIS
  38. .B #include <corosync/votequorum.h>
  39. .sp
  40. .BI "int votequorum_dispatch(votequorum_handle_t " handle ", votequorum_dispatch_t *" dispatch_types ");"
  41. .SH DESCRIPTION
  42. The
  43. .B votequorum_dispatch
  44. function is used to dispatch configuration changes.
  45. .PP
  46. Each application may have several connections to the votequorum API. Each application
  47. uses the
  48. .I handle
  49. argument to uniquely identify the connection.
  50. .PP
  51. The
  52. .I dispatch_types
  53. argument is used to identify the type of dispatch to execute. The possible types are
  54. defined by the structure:
  55. .IP
  56. .RS
  57. .ne 18
  58. .nf
  59. .ta 4n 30n 33n
  60. typedef enum {
  61. CS_DISPATCH_ONE,
  62. CS_DISPATCH_ALL,
  63. CS_DISPATCH_BLOCKING
  64. } votequorum_dispatch_t;
  65. .ta
  66. .fi
  67. .RE
  68. .IP
  69. .PP
  70. .PP
  71. The dispatch values have the following meanings:
  72. .TP
  73. .B CS_DISPATCH_ONE
  74. Dispatch at least one callback, blocking until the callback is dispatched.
  75. .TP
  76. .B CS_DISPATCH_ALL
  77. Dispatch all waiting callbacks without blocking to wait for any callbacks.
  78. .TP
  79. .B CS_DISPATCH_BLOCKING
  80. Dispatch all callbacks blocking indefinitely. This is used in a threaded
  81. program where a thread is created, and then votequorum_dispatch() is called immediately
  82. from the created thread to execute callbacks.
  83. .TP
  84. .B CS_DISPATCH_ONE_NONBLOCKING
  85. Dispatch at most one callback. If there is no pending callback,
  86. CS_ERR_TRY_AGAIN is returned.
  87. .SH RETURN VALUE
  88. This call returns the CS_OK value if successful, otherwise an error is returned.
  89. .PP
  90. .SH ERRORS
  91. The errors are undocumented.
  92. .SH "SEE ALSO"
  93. .BR votequorum_overview (8),
  94. .BR votequorum_initialize (3),
  95. .BR votequorum_finalize (3),
  96. .BR votequorum_fd_get (3),
  97. .PP