- 03 Feb, 2016 2 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
If _info handles the arg "ported" it should print out 1 or 0; 0 means it can't be compiled/run/tested on this platform. This lets ccanlint easily skip such modules. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 02 Feb, 2016 5 commits
-
-
David Gibson authored
~0 will be signed and negative on any 2s complement system, and left shifting a negative value has undefined behaviour in C. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
idtree.c:146 triggers a "comparison is always false" warning on some compiler configurations, since the 'id' variable is unsigned. Elsewhere in the module ids seem to be represented by (signed) ints, so use the same convention here, suppressing the warning and also maybe being more correct in other ways. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
The HTABLE_DEFINE_TYPE macro builds a type-specific hash table by constructing a bunch of simple wrapper functions. The user of the hash table may not end up using all of these. With gcc the fact that the functions are inline stops an warnings about unused functions, but that's not the case with clang. Suppress these warnings by marking all the constructed functions except for name##_add() as UNNEEDED (using the macro from ccan/compiler). _add is left alone on the grounds that a hash table you never add anything to isn't much use, so this will help you to spot an entirely redundant HTABLE_DEFINE_TYPE invocation. *_init() would be a more obvious choice, except that there is both *_init() and *_init_sized() and you only need to use one of these. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
The usual way of construction strmap objects is to use the STRMAP_MEMBERS() macro which expands to both a raw strmap structure and a tcon type canary. However, the tcon type canary involves a flexible array member which means that in standard C99 STRMAP_MEMBERS() must appear only at the end of a structure definition. But worse, that structure can then only appear at the end of any other structure it is included in, which is pretty inconvenient for the intended purpose of creating type specific strmaps. gcc extensions allow this to work (somehow), but clang complains loudly about it. The tcon module already includes the TCON_WRAP() mechanism, which already provides this same sort of type-specific definitions in a more general way. So convert strmap (and its users) to that approach. This removes STRMAP_MEMBERS() entirely, breaking compatibility. I'm hoping strmap is used in few enough places that we can get away with that. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
- 29 Jan, 2016 2 commits
-
-
Rusty Russell authored
It does not seem to respect stack games! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Dan Good authored
altstack - run a function with a dedicated stack, and then release the memory Signed-off-by: Dan Good <dan@dancancode.com>
-
- 27 Jan, 2016 2 commits
-
-
David Gibson authored
bfs_dequeue() and dfs_pop() discard the return values of lqueue_dequeue() and lstack_pop() respectively. This is correct, but causes warnings in some compiler configurations (including the one currently used by travis-ci.org). Use the cast-to-void idiom to tell the compiler this is intentional. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
The 'rest' variable in examples_run.c:find_expect() was unused. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
- 26 Jan, 2016 2 commits
-
-
David Gibson authored
configurator.c contains an if with an empty statement on the same line as the condition. This is very easy to misread, and also causes a warning from clang, so move the ; onto the next line. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
Still not exactly a great coverage of different C compilers, but clearly better than *just* gcc. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
- 21 Jan, 2016 1 commit
-
-
Dan Good authored
rszshm - resizable pointer-safe shared memory Signed-off-by: Dan Good <dan@dancancode.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 19 Jan, 2016 3 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 18 Jan, 2016 1 commit
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 05 Jan, 2016 1 commit
-
-
Dan Good authored
Thanks to the detailed feedback from David Gibson, I made the following improvements: * add missing includes * check for statement expression support, give an error if absent * ccanlint directive to skip "without features" steps * add license ref to top of source files * rename run1.c test to api1.c Signed-off-by: Dan Good <dan@dancancode.com>
-
- 28 Dec, 2015 1 commit
-
-
Dan Good authored
deque - type-preserving resizing circular deque Signed-off-by: Dan Good <dan@dancancode.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
- 14 Dec, 2015 1 commit
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 10 Dec, 2015 2 commits
- 09 Dec, 2015 3 commits
-
-
Joel Stanley authored
progress found but fubar in MOD is now: 'progress' found but 'fubar' in MOD Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Joel Stanley authored
The webfont forces http, which results in a mixed content warning if you're visiting the site on https. Strip the protocol so we use whatever the user has connected with. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Joel Stanley authored
The SVN mirror disappeared some time ago. It now lives on Github. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 20 Nov, 2015 12 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
David Gibson authored
This patch adds a new test graph "shortcut2" which includes a negative cost edge. Along with that we add a testcase for Dijkstra's algorithm checking that it gracefully fails in this case. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
For all the existing test graphs, the shortest path by cost is also the shortest path by number of edges. This patch adds a new test graph where that is not the case, in order to test that the Dijkstra's algorithm implementation correctly handles that case. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
At the moment the "parallel" test graph just uses the default cost of 1 for all the links between the two nodes. This patch changes that so that the links have cost 2, except (optionally) one with cost 1. This provides a useful test for the Dijkstra's algorithm implementation to ensure that it picks the correct link for the shortest path. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
Implement Dijkstra's algorithm for one-source shortest-path. This uses the lpq module as the implementation of the priority queue. That means this implementation is some way behind the theoretical efficiency of Dijkstra's algorithm. It should be reasonably straightforward to swap out the priority queue for a better one in the future, though. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
This allows the edge_info callback to supply a cost or length for an edge. For now we only support 'long' valued costs. If the callback doesn't supply a cost, it's considered cost 1. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 15 Nov, 2015 1 commit
-
-
Andrew Jeffery authored
Neatly, this reduces some of the OpenMP-related noise in the implementation by removing the need for the include. The loop body of grp_for() is also clearer as a result of the change; the changes to the function interfaces motivated a re-think of the complexity here.
-
- 13 Nov, 2015 1 commit
-
-
Andrew Jeffery authored
-