Russell Bryant
907d974352
Add calls to pthread_attr_destroy().
...
This patch adds a couple of missing calls to pthread_attr_destroy().
There were a couple of instances where pthread_attr_init() was being
used without a cooresponding call to pthread_attr_destroy(). This also
localizes the pthread_attr_t to the function where it is needed instead
of having it persist (the man page specifically states that destroying
the attributes structure has no effect on threads created using the
attributes).
Signed-off-by: Russell Bryant <russell@russellbryant.net>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-02-21 12:14:07 -07:00
Steven Dake
0cf6c6c7db
Add tests for posix scheduling apis to configure.ac and use them to determine
...
if we should set scheduling priorities or not.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2277 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-21 16:33:25 +00:00
Steven Dake
ff8283f0b1
Rename queue datastructure to cs_queue data structure because some fail
...
operating system struct queue in the globally scoped headers.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2211 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 00:47:56 +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
Steven Dake
e9d718d01d
Remove mempool since it is unused and isn't going to be a feature in
...
this release.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2141 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-23 19:39:20 +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
Jim Meyering
88ee2815da
don't shadow the global type name, "timer_handle"
...
* exec/coropoll.c (poll_timer_delete): Rename locals and/or params.
* exec/timer.c (corosync_timer_delete): Likewise.
(corosync_timer_expire_time_get): Likewise.
* exec/tlist.h (timerlist_del, timerlist_expire_time): Likewise.
(timerlist_pre_dispatch, timerlist_post_dispatch): Likewise.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2067 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-15 19:12:10 +00:00
Steven Dake
acac398abb
Fix timers not expiring.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2006 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 21:07:11 +00:00
Jim Meyering
59718fb62a
timer.c: connect with its published prototypes
...
* exec/timer.c: Include "timer.h".
* exec/timer.h (corosync_timer_init): Make return type in prototype
match the one in the function definition.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1978 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:32:40 +00:00
Jim Meyering
767e64ff4d
timer.c: don't infloop upon poll failure (e.g., ENOMEM)
...
* exec/timer.c (prioritized_timer_thread): Remove unreached
call to pthread_exit after infloop.
Return NULL for any poll failure other than EINTR.
Use "continue" rather than an equivalent "goto".
Return NULL upon failed pthread_setschedparam.
This also avoids a warning.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1916 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 16:33:39 +00:00
Steven Dake
e77b1e21ad
Make all threads use same scheduling priority even with -p option
...
specified to avoid deadlock in spinlocks.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1912 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-25 18:25:18 +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
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
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
01b8bc6ab2
Finish the renaming of openais to corosync in the tree.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1646 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-15 06:15:26 +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
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
Steven Dake
46babc95ad
Initial move of corosync and openais trees into seperate directories.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1582 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-07-21 07:59:08 +00:00
Steven Dake
46b0163813
Change all email addresses that were sdake@mvista.com to sdake@redhat.com.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1541 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-05-12 13:48:06 +00:00
Steven Dake
ba2f3a391a
Fix missing commit from timer.c in trunk.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1472 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-10-22 15:53:45 +00:00
Steven Dake
d0f5ef7ed1
Fix problem where adding a timer in a timer callback would lock system
...
and also timer additions were not protected by mutex because of backwards
pthread_equal comparison.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1463 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-10-02 16:29:33 +00:00
Steven Dake
113a3c4f88
The logsys logging system. Read logsys_overview.8.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1428 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-09-09 06:38:10 +00:00
Steven Dake
64fb1d1c18
Change timers to add duration and absolute timers. Use nanoseconds since
...
epoch to track timers.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1378 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-06-04 23:21:46 +00:00
Patrick Caulfield
08dd4174c6
In trunk, totemip.h and totem.h call for "../include/swab.h" - this works fine
...
when building openais itself but causes problems when installed as those files
will not be in the right place.
So, I've moved these includes out of totemip.h and totem.h and into the .c files
that call them.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1370 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-05-05 14:02:53 +00:00
Steven Dake
acfc7e5b48
Convert some spaces to tabs that was already in the whitetank branch.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1331 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-12-12 18:21:33 +00:00
Steven Dake
90ccff6bbc
Solaris port for openais
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1175 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-08-05 02:22:12 +00:00
Steven Dake
ba70bff546
Rework of the timer system to allow timers to be added in dispatch handlers.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1099 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-06-29 22:03:08 +00:00
Steven Dake
e0f1ae2f88
Corrected timer deadlock that occurs when a timer add or delete operation
...
occurs within a timer expiration event.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1089 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-06-26 20:30:44 +00:00
Steven Dake
f9abb3899e
Modify AMF to use new timer.c/timer.h routines properly
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1076 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-06-21 21:32:03 +00:00
Steven Dake
526d81bf91
Missed timer commit.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1069 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-06-19 10:51:41 +00:00