Commit Graph

44 Commits

Author SHA1 Message Date
Angus Salkeld
4ff33854ad add __attribute__((noreturn)) to functions that always exit.
we had some __attribute__((__noreturn__))
and some    __attribute__((noreturn))

I made them all: __attribute__((noreturn))



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2853 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-19 04:34:53 +00:00
Jan Friesse
f4a644c711 Add schedwrk_create_nolock function
This patch adds schedwrk_create_nolock, which will not call
serialize_lock before execution of callback.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2649 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-01-22 09:45:29 +00:00
Angus Salkeld
73a24c0352 Add totem stats to objdb.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2517 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-12 17:30:20 +00:00
Angus Salkeld
f78e719713 Add per service-function statistics.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2515 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-12 00:39:39 +00:00
Angus Salkeld
73b7aa19bb Add value types to objdb keys.
This allows you to create a key with a know type.
And then get the type with the key value.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2511 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-10 03:20:38 +00:00
Steven Dake
15d2c48963 Export poll handle via coroapi.h.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2318 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-29 23:24:24 +00:00
Steven Dake
76bc62a5d9 Rename request_shutdown to shutdown_request in coroapi.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2282 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-22 18:29:43 +00:00
Steven Dake
71d2a32512 Add dump_state to coroapi.h. Need to remove logging output from signal
handlers.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2281 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-22 18:18:15 +00:00
Jim Meyering
d44aad2eea don't include <assert.h> when it's not used
* exec/apidef.c: Likewise.
* exec/mainconfig.c: Likewise.
* exec/service.c: Likewise.
* exec/timer.c: Likewise.
* exec/totemconfig.c: Likewise.
* exec/totemmrp.c: Likewise.
* exec/vsf_quorum.c: Likewise.
* services/testquorum.c: Likewise.
* test/cpgbench.c: Likewise.
* test/cpgbenchzc.c: Likewise.
* tools/corosync-fplay.c: Likewise.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2192 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-18 16:41:37 +00:00
Christine Caulfield
e9660ee62f Add libnss security support to corosync.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2145 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-25 14:05:27 +00:00
Steven Dake
bc636acac7 add request_shutdown call to coroapi.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2140 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-23 19:34:26 +00:00
Steven Dake
51ef3b5c00 Include file cleanups.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2134 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-23 17:03:21 +00:00
Steven Dake
8126cf7458 Reworking of include file dependencies.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2119 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 09:01:30 +00:00
Fabio M. Di Nitto
c3c75acfd2 Add logsys v3
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2091 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-20 04:28:33 +00:00
Steven Dake
221dddd0dd add schedwrk_create and schedwrk_destroy coroapi functions.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2089 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-18 14:39:57 +00:00
Steven Dake
f70605bec2 Remove warnings about typedefs in apidef.c.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2080 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-18 07:18:08 +00:00
Jim Meyering
2eba2a6cb8 continue pulling previous thread: mostly constification
* exec/apidef.c (typedef_tpg_join, typedef_tpg_leave)
(typedef_tpg_groups_mcast, typedef_tpg_groups_send_ok):
* exec/sync.c (barrier_data_process, sync_barrier_send)
(sync_start_init, sync_service_init, sync_start_process)
(sync_service_process, sync_deliver_fn, sync_request_send)
(sync_request):
* exec/sync.h (name):
* exec/totemmrp.c (totemmrp_callback_token_create):
* exec/totemmrp.h (TOTEMMRP_H_DEFINED):
* exec/totempg.c (list, app_confchg_fn)
(callback_token_received_fn, totempg_callback_token_create)
(totempg_groups_mcast_joined, totempg_groups_joined_release)
(totempg_groups_mcast_groups):
* exec/totemsrp.c (callback_fn, totemsrp_confchg_fn)
(totemsrp_initialize, totemsrp_callback_token_create):
* exec/totemsrp.h (TOTEMSRP_H_DEFINED):
* exec/vsf_ykd.c (ykd_state_send_msg, ykd_attempt_send_msg)
(ykd_confchg_fn):
* include/corosync/engine/coroapi.h (timer_add_absolute)
(totem_ifaces_print, totem_ip_print, totem_callback_token_create)
(sync_request, plugin_interface_reference):
* include/corosync/totem/totempg.h (TOTEMPG_SAFE):
* services/cpg.c (cpg_confchg_fn):
* services/pload.c (msgs_sent, pload_service_engine)
(send_message, start_mcasting):
* services/votequorum.c (conn, quorum_confchg_fn):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2030 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 06:44:59 +00:00
Steven Dake
12754324f9 Forward port of sync v1 engine from whitetank and rework of quorum
engine to not break syncing.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2019 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-07 21:41:25 +00:00
Jim Meyering
7a6e1784fd * exec/apidef.c: Include "apidef.h".
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1979 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:32:48 +00:00
Jim Meyering
d7492c55da apidef.c: avoid 1 warning
* exec/apidef.c (_corosync_public_exit_error): Mark as "noreturn".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1970 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:17:56 +00:00
Steven Dake
c5fc824d7f Abstracted Shared Memory IPC library
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1885 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-22 15:28:54 +00:00
Fabio M. Di Nitto
031c02f589 - Every .c file should include "config.h" to get the right defines...
- services/Makefile.am: add include search paths for config.h

- include/corosync/cs_config.h.in exports LCRSODIR and SOCKETDIR

- tools/Makefile.am: drop -D defines for dirs that are now in
cs_config.h or config.h

- configure.ac: sanitize prefix and exec_prefix paths. Export DIRS in
*config.h

- lib/Makefile.am: : drop -D defines for dirs that are now in
cs_config.h or config.h. Add rule to build lcr_ifact.o or building from
lib/ fails miserably



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1877 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 12:58:53 +00:00
Steven Dake
1f05ffd27d Add reserve/release functionality to totem to reserve message queue
space.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1793 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-06 07:38:34 +00:00
Steven Dake
58ab8d4a65 Unification around hdb_handle_t data type.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1782 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-25 11:14:47 +00:00
Steven Dake
c077255702 Whitetank IPC Forward Port.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1766 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-19 02:23:58 +00:00
Ryan O'Hara
4e189328ed Add timer_expire_time_get
Add timer_expire_time_get corosync API call.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1761 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-18 01:28:35 +00:00
Ryan O'Hara
f116dce6f2 Add timer_time_get to the corosync API.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1760 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-14 02:06:20 +00:00
Christine Caulfield
cfc7da3573 quorum is now an optional loadable module (though I've put it into the
defaults in services.c) and can load another module to do the quorum
work (eg YKD which I've made more compliant too). All the quorum code
has been removed from sync.c. quorum.c is simply a shim later for the
coroapi, the main module is in vsf_quorum.c

There are coroapi calls to query quorate status and also to get
notifications when it changes.

I've included the testquorum.lcrso module in this patch because I think
it's really helpful for testing. It sets the quorum state based on an 
objdb variable, this can be set or cleared using corosync-cfgtool



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1704 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-08 15:55:41 +00:00
Angus Salkeld
56eaee9561 cleanup the last of the SAF headers and types
This includes the rename of identifiers from corosync to cs.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1689 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-06 21:49:07 +00:00
Steven Dake
6198080084 performance loading service engine first implementation.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1682 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-30 22:41:34 +00:00
Angus Salkeld
301a730dd1 remove some new warnings from corosync
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1677 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-21 21:44:29 +00:00
Angus Salkeld
f9609f3217 Propagate the flow control state between AIS exec and library
This patch causes the flow control state in the library to be set
properly when the flow control is turned off (disabled).  Then it can be
read properly by the flow control apis.
This also fixes the case where the application is no longer sending
messages and it has already dispatched all its received messages
before flow control is disabled.

Also, CPG response messages with a TRY_AGAIN error did NOT contain
a valid flow control state value. This meant the library could get
stuck with flow control enabled (flow control was never enabled
for the EXEC, so no disable event occurred).
This case was hit when a new node was joining - sync_in_process()
resulted in a TRY_AGAIN for error cpg_mcast_joined).

Also, in message_handler_req_exec_cpg_mcast() the state passed
back to the library defaulted to disabled for messages received
from another node (even if flow control was still enabled)
- this meant if multiple nodes were sending CPG messages,
  then the library flow control state flip-flopped between
  enabled and disabled.

Author: Steven Dake <sdake@redhat.com> &
        Tim Beale <tim.beale@alliedtelesis.co.nz>




git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1667 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-09-17 19:15:00 +00:00
Angus Salkeld
531bd3adec Add support for AMF (sync_request)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1666 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-09-17 19:04:19 +00:00
Christine Caulfield
1d2d771f99 This patch adds key_increment and key_decrement calls to the objdb and
confdb subsystems.

This is useful to provide atomic counters (ag handle numbers) for
long-running (though not persistent) connections. It's not currently
possible via confdb to atomically get a new number from objdb due to the
lack of locking. Doing it via increment operations in the IPC thread
provides enough atomicity to make it useful. Fabio has already
identified a use for these calls.

It could also provide some form of basic co-operative locking mechanism
for IPC-using processes (not direct objdb calls).



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1662 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-09-03 07:58:08 +00:00
Christine Caulfield
2bab5b36cc Remove the disliked *_from calls from the objdb and recast
the confdb library to use the new find_create/find_next/find_destroy API
calls instead.

I've kept the libcondfb API the same as before with the single change of
adding a confdb_object_find_destroy to tidy up the find handle after
use. If you don't call this then libcondfb will do it for you when
confdb_finalize is called.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1660 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-26 07:34:22 +00:00
Steven Dake
dd3991c0bb Proper rename of openais usage to corosync throughout tree.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1637 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:54:46 +00:00
Steven Dake
e1f531380a Revert patch 1633 which breaks build.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1636 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:44:26 +00:00
Steven Dake
c4a1c7eb96 Change all occurances of openais to corosync.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1633 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:04:01 +00:00
Fabien Thomas
0c92a5e564 reorganize include file to match installed tree to build openais without installing corosync; correct some warnings and error under FreeBSD and Darwin
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1632 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 14:59:50 +00:00
Fabio M. Di Nitto
010198fac4 Add support for reload operations within objdb and plugins.
Use a 2 phase "commit" operation:
1) Invoke verifyconfig that should catch the errors before the reload operation
2) Invoke reloadconfig that performs the operation and should _never_ fail

Implementation note: if step 2 fails, there is no fall back at the moment.

Fix the IPC table for confdb:
MESSAGE_REQ_CONFDB_XPATH_EVAL_EXPRESSION = 12 was added to include/ipc_confdb.h
without an associated call. Thanks Chrissie for spotting this.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1629 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-13 03:58:03 +00:00
Steven Dake
cd2f61adfd Add some totem process group interfaces to the API.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1628 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-12 09:06:46 +00:00
Steven Dake
50c25e7609 Add module load and unload to the exported coroapi.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1626 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-06 15:00:47 +00:00
Steven Dake
225b183bcb Add callback notification about changes to the object db and confdb apis.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1625 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-05 16:34:14 +00:00
Steven Dake
617dbdf2f0 Split openais and corosync tree into two seperate repositories.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1622 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-05 13:23:46 +00:00