]> jfr.im git - irc/atheme/libmowgli-2.git/log
irc/atheme/libmowgli-2.git
11 years agothread: gut Sun-specific implementation. origin/release/2.0
Elizabeth J. Myers [Mon, 23 Apr 2012 16:31:19 +0000 (11:31 -0500)] 
thread: gut Sun-specific implementation.

Rationale for this is we don't work on an ancient SunOS systems anyway
because a C99 compiler is not available; modern Solaris systems have
pthreads.

11 years agofix examples build (closes #2)
William Pitcock [Sun, 3 Jun 2012 05:22:05 +0000 (00:22 -0500)] 
fix examples build (closes #2)

12 years agoeventloop: add mowgli_pollable_trigger(), which handles callbacks
William Pitcock [Thu, 17 May 2012 00:49:10 +0000 (19:49 -0500)] 
eventloop: add mowgli_pollable_trigger(), which handles callbacks

12 years agoPartially backport ca179dfb9ba6d4a86f6bc231ee3ae68f69c20cbf
Elizabeth J. Myers [Tue, 15 May 2012 20:28:59 +0000 (15:28 -0500)] 
Partially backport ca179dfb9ba6d4a86f6bc231ee3ae68f69c20cbf

12 years agoeventloop: use 'deadline' instead of 'time_min' in various places libmowgli-2.0.0
William Pitcock [Wed, 18 Apr 2012 10:56:14 +0000 (10:56 +0000)] 
eventloop: use 'deadline' instead of 'time_min' in various places

'deadline' is a more descriptive term, since the event scheduler implements earliest-deadline-first
scheduling, and 'time_min' was the deadline that had to be met.

12 years agoeventloop: invalidate timer cache if a timer is being scheduled for immediate execution
William Pitcock [Wed, 18 Apr 2012 10:44:14 +0000 (10:44 +0000)] 
eventloop: invalidate timer cache if a timer is being scheduled for immediate execution

otherwise the cache may indicate there are no pending events scheduled and let the eventloop sleep.

12 years agoeventloop: use run_once op if timeout_once is given timeout=-1.
William Pitcock [Wed, 18 Apr 2012 10:09:48 +0000 (10:09 +0000)] 
eventloop: use run_once op if timeout_once is given timeout=-1.

This ensures we check our timers if we're going to sleep forever.

12 years agocontainer/dictionary: don't dup keys.
William Pitcock [Wed, 18 Apr 2012 10:07:02 +0000 (10:07 +0000)] 
container/dictionary: don't dup keys.

12 years agocontainer/dictionary: finish using const void keys
William Pitcock [Wed, 18 Apr 2012 09:24:44 +0000 (04:24 -0500)] 
container/dictionary: finish using const void keys

12 years agoeventloop: add binding userdata get/set functions
William Pitcock [Wed, 18 Apr 2012 09:10:14 +0000 (04:10 -0500)] 
eventloop: add binding userdata get/set functions

12 years agocontainer/dictionary: make compare function pointer-safe
William Pitcock [Wed, 18 Apr 2012 09:03:32 +0000 (09:03 +0000)] 
container/dictionary: make compare function pointer-safe

12 years agoReadd dictionary type.
William Pitcock [Wed, 18 Apr 2012 08:02:20 +0000 (03:02 -0500)] 
Readd dictionary type.

12 years agoeventloop: use explicit casting in headers for C++ compatibility
William Pitcock [Wed, 18 Apr 2012 07:58:20 +0000 (02:58 -0500)] 
eventloop: use explicit casting in headers for C++ compatibility

12 years agodns: avoid using C++-reserved keyword "class" in prototypes.
William Pitcock [Wed, 18 Apr 2012 07:56:12 +0000 (02:56 -0500)] 
dns: avoid using C++-reserved keyword "class" in prototypes.

12 years agoext/getopt_long: initialize mowgli_optarg and mowgli_optreset
William Pitcock [Wed, 18 Apr 2012 01:29:03 +0000 (20:29 -0500)] 
ext/getopt_long: initialize mowgli_optarg and mowgli_optreset

12 years agoplatform/win32/socketpair: warnings clean
William Pitcock [Mon, 16 Apr 2012 20:14:08 +0000 (15:14 -0500)] 
platform/win32/socketpair: warnings clean

12 years agoplatform/win32/socketpair: fix style
William Pitcock [Mon, 16 Apr 2012 20:12:52 +0000 (15:12 -0500)] 
platform/win32/socketpair: fix style

12 years agodns: windows fixes
William Pitcock [Mon, 16 Apr 2012 20:11:15 +0000 (15:11 -0500)] 
dns: windows fixes

12 years agoplatform/win32: fixes
William Pitcock [Mon, 16 Apr 2012 20:04:36 +0000 (15:04 -0500)] 
platform/win32: fixes

12 years agoext/proctitle: fix windows build
William Pitcock [Mon, 16 Apr 2012 20:03:14 +0000 (15:03 -0500)] 
ext/proctitle: fix windows build

12 years agoplatform/win32: implement pipe and socketpair
William Pitcock [Mon, 16 Apr 2012 19:58:37 +0000 (14:58 -0500)] 
platform/win32: implement pipe and socketpair

12 years agoMowgli 2.0.0.
William Pitcock [Mon, 16 Apr 2012 19:36:04 +0000 (14:36 -0500)] 
Mowgli 2.0.0.

12 years agoRemove concurrent stuff.
William Pitcock [Mon, 16 Apr 2012 19:30:06 +0000 (14:30 -0500)] 
Remove concurrent stuff.

Patrick McFarland added it, but he has since forked and we don't believe in threads here anyway.

12 years agovio/vio: add stub for mowgli_vio_err_sslerrorcode() when built without OPENSSL support
William Pitcock [Mon, 16 Apr 2012 19:26:39 +0000 (14:26 -0500)] 
vio/vio: add stub for mowgli_vio_err_sslerrorcode() when built without OPENSSL support

Pointed out by marienz.

12 years agoeventloop: add mowgli_eventloop_timeout_once().
William Pitcock [Mon, 16 Apr 2012 10:35:39 +0000 (05:35 -0500)] 
eventloop: add mowgli_eventloop_timeout_once().

This allows us to integrate more cleanly into glib eventloop as a GPollFunc.

12 years agoeventloop: add eventloop_ops::timeout_once
William Pitcock [Mon, 16 Apr 2012 10:33:31 +0000 (05:33 -0500)] 
eventloop: add eventloop_ops::timeout_once

12 years agoFix compile error.
William Pitcock [Thu, 12 Apr 2012 02:00:09 +0000 (21:00 -0500)] 
Fix compile error.

12 years agolibmowgli 2.0.0-beta1. libmowgli-2.0.0-beta1
William Pitcock [Thu, 12 Apr 2012 00:15:14 +0000 (19:15 -0500)] 
libmowgli 2.0.0-beta1.

12 years agoRemove coroutine stuff.
William Pitcock [Thu, 12 Apr 2012 00:14:36 +0000 (19:14 -0500)] 
Remove coroutine stuff.

12 years agocontainer/index: no realloc
William Pitcock [Mon, 9 Apr 2012 04:01:04 +0000 (23:01 -0500)] 
container/index: no realloc

12 years agocore/mowgli_string: cut-and-paste fix
William Pitcock [Mon, 9 Apr 2012 04:00:53 +0000 (23:00 -0500)] 
core/mowgli_string: cut-and-paste fix

12 years agocore/mowgli_string: don't use realloc().
William Pitcock [Mon, 9 Apr 2012 03:56:54 +0000 (22:56 -0500)] 
core/mowgli_string: don't use realloc().

12 years agodns: maybe fix windows compile.
William Pitcock [Mon, 9 Apr 2012 03:51:54 +0000 (22:51 -0500)] 
dns: maybe fix windows compile.

12 years agoconcurrent/atomic: use uintptr_t for representing pointer addresses.
William Pitcock [Mon, 9 Apr 2012 02:06:38 +0000 (21:06 -0500)] 
concurrent/atomic: use uintptr_t for representing pointer addresses.

12 years agoconcurrent/atomic: use GCC pragmas to work around a GCC verifier bug
William Pitcock [Mon, 9 Apr 2012 01:52:08 +0000 (20:52 -0500)] 
concurrent/atomic: use GCC pragmas to work around a GCC verifier bug

12 years agoconcurrent/atomic: fix some prototype warnings
William Pitcock [Mon, 9 Apr 2012 01:42:42 +0000 (20:42 -0500)] 
concurrent/atomic: fix some prototype warnings

12 years agoconcurrent/future: fix prototype strictness
William Pitcock [Mon, 9 Apr 2012 01:37:30 +0000 (20:37 -0500)] 
concurrent/future: fix prototype strictness

12 years agoext/getopt_long: unclobber system namespace
William Pitcock [Mon, 9 Apr 2012 01:29:33 +0000 (20:29 -0500)] 
ext/getopt_long: unclobber system namespace

12 years agoMerge branch 'master' of ssh://git.atheme.org/gitroot/libmowgli-2
Elizabeth J. Myers [Sun, 8 Apr 2012 08:33:01 +0000 (03:33 -0500)] 
Merge branch 'master' of ssh://git.atheme.org/gitroot/libmowgli-2

12 years agoproctitle: fix warning.
Elizabeth J. Myers [Sun, 8 Apr 2012 08:18:25 +0000 (03:18 -0500)] 
proctitle: fix warning.

12 years agoproctitle: change malloc() to mowgli_alloc.
Elizabeth J. Myers [Fri, 6 Apr 2012 03:55:56 +0000 (22:55 -0500)] 
proctitle: change malloc() to mowgli_alloc.

Not sure how I managed this one. "oops."

12 years agohelper: allow setting of the process title.
Elizabeth J. Myers [Fri, 6 Apr 2012 03:53:20 +0000 (22:53 -0500)] 
helper: allow setting of the process title.

Also allow proctitle to discard empty process titles.

12 years agoproctitle: add support for Linux prctl(). Note not all utilities use it.
Elizabeth J. Myers [Fri, 6 Apr 2012 01:19:09 +0000 (20:19 -0500)] 
proctitle: add support for Linux prctl(). Note not all utilities use it.

Some utilities use argv[0] instead. :(.

12 years agofuture: fix compilation with GCC 4.5 and earlier.
William Pitcock [Fri, 6 Apr 2012 00:07:41 +0000 (19:07 -0500)] 
future: fix compilation with GCC 4.5 and earlier.

12 years agoproctitle: fix on Linux and remove needless function.
Elizabeth J. Myers [Thu, 5 Apr 2012 07:56:24 +0000 (02:56 -0500)] 
proctitle: fix on Linux and remove needless function.

12 years agoeventloop/helper: fix braindamage caused by rebasing
William Pitcock [Thu, 5 Apr 2012 05:52:33 +0000 (00:52 -0500)] 
eventloop/helper: fix braindamage caused by rebasing

12 years agoeventloop/helper: use socketpair() instead of pipe().
William Pitcock [Thu, 5 Apr 2012 05:49:33 +0000 (00:49 -0500)] 
eventloop/helper: use socketpair() instead of pipe().

Socketpair is more useful because we only need one socketpair verses two pipes for bidirectional
I/O.

12 years agoproctitle: fix warning.
Elizabeth J. Myers [Sun, 8 Apr 2012 08:18:25 +0000 (03:18 -0500)] 
proctitle: fix warning.

12 years agoatomic: add synchronize, undef internal symbol spam
Patrick McFarland [Sun, 8 Apr 2012 08:06:13 +0000 (04:06 -0400)] 
atomic: add synchronize, undef internal symbol spam

12 years agoproctitle: change malloc() to mowgli_alloc.
Elizabeth J. Myers [Fri, 6 Apr 2012 03:55:56 +0000 (22:55 -0500)] 
proctitle: change malloc() to mowgli_alloc.

Not sure how I managed this one. "oops."

12 years agohelper: allow setting of the process title.
Elizabeth J. Myers [Fri, 6 Apr 2012 03:53:20 +0000 (22:53 -0500)] 
helper: allow setting of the process title.

Also allow proctitle to discard empty process titles.

12 years agoproctitle: add support for Linux prctl(). Note not all utilities use it.
Elizabeth J. Myers [Fri, 6 Apr 2012 01:19:09 +0000 (20:19 -0500)] 
proctitle: add support for Linux prctl(). Note not all utilities use it.

Some utilities use argv[0] instead. :(.

12 years agofuture: fix compilation with GCC 4.5 and earlier.
William Pitcock [Fri, 6 Apr 2012 00:07:41 +0000 (19:07 -0500)] 
future: fix compilation with GCC 4.5 and earlier.

12 years agoproctitle: fix on Linux and remove needless function.
Elizabeth J. Myers [Thu, 5 Apr 2012 07:56:24 +0000 (02:56 -0500)] 
proctitle: fix on Linux and remove needless function.

12 years agoeventloop/helper: fix braindamage caused by rebasing
William Pitcock [Thu, 5 Apr 2012 05:52:33 +0000 (00:52 -0500)] 
eventloop/helper: fix braindamage caused by rebasing

12 years agoeventloop/helper: use socketpair() instead of pipe().
William Pitcock [Thu, 5 Apr 2012 05:49:33 +0000 (00:49 -0500)] 
eventloop/helper: use socketpair() instead of pipe().

Socketpair is more useful because we only need one socketpair verses two pipes for bidirectional
I/O.

12 years agofuturetest: fix indentfail
Patrick McFarland [Thu, 5 Apr 2012 05:00:33 +0000 (01:00 -0400)] 
futuretest: fix indentfail

12 years agoMerge branch 'develop' of git://caspar.adterrasperaspera.com/libmowgli-2
Elizabeth J. Myers [Thu, 5 Apr 2012 02:54:16 +0000 (21:54 -0500)] 
Merge branch 'develop' of git://caspar.adterrasperaspera.com/libmowgli-2

12 years agoproctitle: fix error with API.
Elizabeth J. Myers [Thu, 5 Apr 2012 02:31:16 +0000 (21:31 -0500)] 
proctitle: fix error with API.

12 years agoext: add proctitle setting functions to set process titles portably
Elizabeth J. Myers [Thu, 5 Apr 2012 02:27:55 +0000 (21:27 -0500)] 
ext: add proctitle setting functions to set process titles portably

12 years agofuture: Make it clear non-normal behavior is a consistency failure
Patrick McFarland [Wed, 4 Apr 2012 09:56:37 +0000 (05:56 -0400)] 
future: Make it clear non-normal behavior is a consistency failure

12 years agofuture: clean up syntax style slightly
Patrick McFarland [Wed, 4 Apr 2012 03:00:34 +0000 (23:00 -0400)] 
future: clean up syntax style slightly

12 years agofuture: Improve cancel method
Patrick McFarland [Wed, 4 Apr 2012 02:51:38 +0000 (22:51 -0400)] 
future: Improve cancel method

12 years agoImprove futures to be more paranoid about potential failures
Patrick McFarland [Wed, 4 Apr 2012 02:36:32 +0000 (22:36 -0400)] 
Improve futures to be more paranoid about potential failures

12 years agoMake struct private
Patrick McFarland [Wed, 4 Apr 2012 01:22:29 +0000 (21:22 -0400)] 
Make struct private

12 years agomachine: fix compile error.
Elizabeth J. Myers [Mon, 2 Apr 2012 01:09:49 +0000 (20:09 -0500)] 
machine: fix compile error.

12 years agoremove remnants of futex check as it's not necessary anymore.
Elizabeth J. Myers [Mon, 2 Apr 2012 01:04:20 +0000 (20:04 -0500)] 
remove remnants of futex check as it's not necessary anymore.

12 years agoAdd missing coroutine_private.h.
William Pitcock [Mon, 2 Apr 2012 01:02:05 +0000 (20:02 -0500)] 
Add missing coroutine_private.h.

12 years agomowgli_strlcpy/strlcat: use libbsd implementation
William Pitcock [Mon, 2 Apr 2012 00:24:49 +0000 (19:24 -0500)] 
mowgli_strlcpy/strlcat: use libbsd implementation

12 years agoRemove something I added 5 years ago
Patrick McFarland [Sun, 1 Apr 2012 19:19:52 +0000 (15:19 -0400)] 
Remove something I added 5 years ago

12 years agoAdded AVR32, SuperH, and VMS to machine.h
Patrick McFarland [Sun, 1 Apr 2012 12:27:48 +0000 (08:27 -0400)] 
Added AVR32, SuperH, and VMS to machine.h

12 years agodns: some optimisations and shuffling.
Elizabeth J. Myers [Sun, 1 Apr 2012 03:14:34 +0000 (22:14 -0500)] 
dns: some optimisations and shuffling.

Note the mowgli_dns_init function now takes a const mowgli_ops_t * ptr
to specify custom ops.

12 years agothread: make ops tables const.
Elizabeth J. Myers [Sat, 31 Mar 2012 16:52:44 +0000 (11:52 -0500)] 
thread: make ops tables const.

GCC will then optimise each op in the table into a jmp.

12 years agoMerge branch 'master' of ssh://git.atheme.org/gitroot/libmowgli-2
Elizabeth J. Myers [Sat, 31 Mar 2012 03:08:57 +0000 (22:08 -0500)] 
Merge branch 'master' of ssh://git.atheme.org/gitroot/libmowgli-2

12 years agodns_evloop: use a heap instead of mowgli_alloc for storing reslist
Elizabeth J. Myers [Sat, 31 Mar 2012 03:08:22 +0000 (22:08 -0500)] 
dns_evloop: use a heap instead of mowgli_alloc for storing reslist
entries.

12 years agodns: use mowgli_eventloop_get_time() instead of touching struct members
William Pitcock [Sat, 31 Mar 2012 02:36:04 +0000 (21:36 -0500)] 
dns: use mowgli_eventloop_get_time() instead of touching struct members

12 years agocoroutine: some initial bits of this module, incomplete
William Pitcock [Sat, 31 Mar 2012 02:34:55 +0000 (21:34 -0500)] 
coroutine: some initial bits of this module, incomplete

12 years agodns_evloop: some optimisations.
Elizabeth J. Myers [Sat, 31 Mar 2012 01:55:47 +0000 (20:55 -0500)] 
dns_evloop: some optimisations.

12 years agogitignore: update, and add windows files that should be ignored.
Elizabeth J. Myers [Fri, 30 Mar 2012 17:27:30 +0000 (12:27 -0500)] 
gitignore: update, and add windows files that should be ignored.

12 years agofix warning in example and remove useless debug logging.
Elizabeth J. Myers [Fri, 30 Mar 2012 17:25:54 +0000 (12:25 -0500)] 
fix warning in example and remove useless debug logging.

12 years agovio: let socket close itself after an error if it wants.
Elizabeth J. Myers [Fri, 30 Mar 2012 17:13:36 +0000 (12:13 -0500)] 
vio: let socket close itself after an error if it wants.

12 years agoMerge branch 'develop' of git://caspar.adterrasperaspera.com/libmowgli-2
Elizabeth J. Myers [Fri, 30 Mar 2012 06:00:49 +0000 (01:00 -0500)] 
Merge branch 'develop' of git://caspar.adterrasperaspera.com/libmowgli-2

12 years agoMerge branch 'master' of ssh://git.atheme.org/gitroot/libmowgli-2
Elizabeth J. Myers [Fri, 30 Mar 2012 05:59:56 +0000 (00:59 -0500)] 
Merge branch 'master' of ssh://git.atheme.org/gitroot/libmowgli-2

12 years agodns: misc. fixes to make it work and an example program.
Elizabeth J. Myers [Fri, 30 Mar 2012 05:59:16 +0000 (00:59 -0500)] 
dns: misc. fixes to make it work and an example program.

12 years agothread/mutex: pair mutex-owning mutex_ops with each mutex by reference
William Pitcock [Thu, 29 Mar 2012 20:22:32 +0000 (15:22 -0500)] 
thread/mutex: pair mutex-owning mutex_ops with each mutex by reference

12 years agothread: remove unneeded 'initialized' variable
William Pitcock [Thu, 29 Mar 2012 20:17:51 +0000 (15:17 -0500)] 
thread: remove unneeded 'initialized' variable

12 years agoMake atomic.h use machine.h instead of the autoconf macro
Patrick McFarland [Thu, 29 Mar 2012 20:00:44 +0000 (16:00 -0400)] 
Make atomic.h use machine.h instead of the autoconf macro

12 years agodns: mowgli_alloc should allocate an object of size mowgli_dns_t, not mowgli_dns_ops_t.
William Pitcock [Thu, 29 Mar 2012 19:56:31 +0000 (14:56 -0500)] 
dns: mowgli_alloc should allocate an object of size mowgli_dns_t, not mowgli_dns_ops_t.

12 years agoAdd endian checking to machine.h
Patrick McFarland [Thu, 29 Mar 2012 12:07:21 +0000 (08:07 -0400)] 
Add endian checking to machine.h

12 years agodns: renaming, and some windows portability gunk.
Elizabeth J. Myers [Thu, 29 Mar 2012 11:35:47 +0000 (06:35 -0500)] 
dns: renaming, and some windows portability gunk.

12 years agoDNS stuff, round deux. This is preliminary stuff, I am not done.
Elizabeth J. Myers [Thu, 29 Mar 2012 11:00:15 +0000 (06:00 -0500)] 
DNS stuff, round deux. This is preliminary stuff, I am not done.

12 years agoFix install process, fix missing include rename
Patrick McFarland [Thu, 29 Mar 2012 10:23:41 +0000 (06:23 -0400)] 
Fix install process, fix missing include rename

12 years agovio: add listen/accept API to OpenSSL.
Elizabeth J. Myers [Thu, 29 Mar 2012 07:04:17 +0000 (02:04 -0500)] 
vio: add listen/accept API to OpenSSL.

It hasn't been tested yet, but should work.

12 years agovio_openssl: get rid of nasty const discarding.
Elizabeth J. Myers [Thu, 29 Mar 2012 04:18:08 +0000 (23:18 -0500)] 
vio_openssl: get rid of nasty const discarding.

12 years agolinebuf: accomodations for edge-triggered interfaces.
Elizabeth J. Myers [Thu, 29 Mar 2012 04:09:51 +0000 (23:09 -0500)] 
linebuf: accomodations for edge-triggered interfaces.

12 years agovio: set NEED{READ,WRITE} for edge-triggered interfaces.
Elizabeth J. Myers [Thu, 29 Mar 2012 03:55:13 +0000 (22:55 -0500)] 
vio: set NEED{READ,WRITE} for edge-triggered interfaces.

On epoll in edge-triggered mode and other edge-triggered interfaces, the fd
won't show up in subsequent batches until all data has been read or the fd is
re-added or other such crap. Signal this to the caller that more reading or
writing may be necessary.

12 years agovio: convert ugly non-syntactic macros to functions.
Elizabeth J. Myers [Thu, 29 Mar 2012 03:42:11 +0000 (22:42 -0500)] 
vio: convert ugly non-syntactic macros to functions.

12 years agoChange mutex.h and thread.h to use the new machine.h defines
Patrick McFarland [Wed, 28 Mar 2012 19:23:46 +0000 (15:23 -0400)] 
Change mutex.h and thread.h to use the new machine.h defines

12 years agoCreate machine.h to make it easier to do platform specific code
Patrick McFarland [Wed, 28 Mar 2012 19:18:47 +0000 (15:18 -0400)] 
Create machine.h to make it easier to do platform specific code

12 years agoChange mowgli_thread to use create/init/deinit/destroy API style
Patrick McFarland [Wed, 28 Mar 2012 15:24:45 +0000 (11:24 -0400)] 
Change mowgli_thread to use create/init/deinit/destroy API style