[ccan] deque: New module

2015-12-23 Thread Dan Good
deque - type-preserving resizing circular deque Signed-off-by: Dan Good --- Makefile-ccan | 1 + ccan/deque/LICENSE | 1 + ccan/deque/_info | 140 +++ ccan/deque/deque.c | 91 ++ ccan/deque/deque.h | 252

Re: [ccan] deque: New module

2015-12-28 Thread Dan Good
ld document that the code is C99? Would the lines below be the right way to handle the statement expression dependance? #if !HAVE_STATEMENT_EXPR #error Sorry, deque requires statement expressions #endif Thanks. -Dan On Sun, Dec 27, 2015 at 10:45 PM David Gibson wrote: > On Wed, Dec 23, 2015 a

[ccan] [PATCH] rszshm: New module

2016-01-18 Thread Dan Good
rszshm - resizable pointer-safe shared memory Signed-off-by: Dan Good --- Makefile-ccan | 1 + ccan/rszshm/LICENSE| 1 + ccan/rszshm/_info | 96 ccan/rszshm/rszshm.c | 240 +++ ccan/rszshm/rszshm.h | 301

[ccan] [PATCH] altstack: New module

2016-01-26 Thread Dan Good
altstack - run a function with a dedicated stack, and then release the memory Signed-off-by: Dan Good --- Makefile-ccan| 1 + ccan/altstack/LICENSE| 1 + ccan/altstack/_info | 125 ccan/altstack/altstack.c | 124

[ccan] [PATCH] altstack: stack alignment and accounting tweaks

2016-01-31 Thread Dan Good
* add altstack_remn, returns amount of stack remaining * increase mapping by 1 page to handle abutment case * capture rsp earlier * align stack to 16 bytes Signed-off-by: Dan Good --- ccan/altstack/altstack.c | 17 ++--- ccan/altstack/altstack.h | 14 ++ ccan/altstack

[ccan] git error on push

2016-02-10 Thread Dan Good
Hi, I'm trying to push the stack alignment patch to the repo, but no joy: 0$ git push origin masterCounting objects: 8, done. Compressing objects: 100% (7/7), done. Writing objects: 100% (8/8), 1.42 KiB | 0 bytes/s, done. Total 8 (delta 5), reused 0 (delta 0) remote: W NAME/ccan/altstack/altstack.

Re: [ccan] git error on push

2016-02-10 Thread Dan Good
Don't I feel silly. Thank you. All better now. On Wed, Feb 10, 2016 at 8:16 PM David Gibson wrote: > On Wed, Feb 10, 2016 at 07:15:02PM +0000, Dan Good wrote: > > Hi, I'm trying to push the stack alignment patch to the repo, but no joy: > > > > 0$ git push o

Re: [ccan] [PATCH 3/4] altstack: Declare memory clobbers

2016-02-16 Thread Dan Good
Thank you for the fixes and improvements. The clobber change is the only that gives me pause. I think the volatile keyword on both is sufficient to prevent re-ordering. Are you sure we need the memory clobber? Thanks. -Dan On Tue, Feb 16, 2016 at 5:04 AM David Gibson wrote: > altstack inclu

Re: [ccan] [PATCH] altstack: stack alignment and accounting tweaks

2016-02-16 Thread Dan Good
I see. Thank you. On Tue, Feb 16, 2016 at 5:04 AM David Gibson wrote: > On Mon, Feb 15, 2016 at 06:29:10PM +0000, Dan Good wrote: > > I thought I understood from our emails at the end of last year that a > > single "polished" commit was desirable. Is that not the

Re: [ccan] altstack causing travis-ci failures

2016-03-25 Thread Dan Good
David did some remarkable investigation into it about a month ago. The code has always worked on the Red Hat based distros I use, and David patched it to work for Ubuntu 12.04; so it seems unlikely to me that any real person would be affected. I suppose I'll try to talk to the Travis people about

Re: [ccan] [PATCH 0/5] altstack: cleanups

2016-06-03 Thread Dan Good
David, thank you for improving the code. I'm traveling for the next week with only an ipad. I'd like to ask your thoughts on a topic or two, but typing on this is grueling. I hope to try for a longer reply later. Thanks again. -Dan On Fri, Jun 3, 2016 at 4:40 AM David Gibson wrote: > Dan, > > He

Re: [ccan] [PATCH 4/5] altstack: Don't use 0 pointer literals

2016-06-11 Thread Dan Good
Hi David, I'm back home in front of a real keyboard, and want to follow up with you about your patches. I must admit that my usual practice is to use NULL, and not 0. Around the time I wrote altstack I had recently read Jen Gustedt's book, Modern C. In it, he makes the point that NULL hides mor

Re: [ccan] [PATCH 5/5] altstack: Don't log internal calls in test cases

2016-06-11 Thread Dan Good
Hairy macros? From the author of the cppmagic module, I shall take that as a compliment. The purpose of the setcall macro and related checks is ensure the correctness of the error path, i.e. if setrlimit ran before a failure, it must run again to undo the first; if mmap ran before a failure, munm

Re: [ccan] [PATCH 4/5] altstack: Don't use 0 pointer literals

2016-06-16 Thread Dan Good
Thank you, both. I'll return to the fold and use NULL, as seems right and proper. On Thu, Jun 16, 2016 at 7:12 AM David Gibson wrote: > On Tue, Jun 14, 2016 at 01:45:10PM +0930, Paul 'Rusty' Russell wrote: > > Dan Good writes: > > > Hi David, > > &

Re: [ccan] [PATCH 5/5] altstack: Don't log internal calls in test cases

2016-06-16 Thread Dan Good
Very well, I've applied your patches as provided (except I dropped the trailing underscore from state.rsp_save). On Thu, Jun 16, 2016 at 7:12 AM David Gibson wrote: > On Sun, Jun 12, 2016 at 02:10:18AM +0000, Dan Good wrote: > > Hairy macros? From the author of the cppmagic m