Skip to content

Commit 4bc5a2d

Browse files
committed
Ready for 3.1.0
1 parent 98bf8ce commit 4bc5a2d

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

Lib/map.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
#include "map.h"
1+
/*
2+
* hashmap implementation provided by Pete Warden (thank you!)
3+
* https://github.com/petewarden/c_hashmap
4+
*/
5+
26
#include "poll_priv.h"
3-
#include <string.h>
47

58
#define INITIAL_SIZE 256
69
#define MAX_CHAIN_LENGTH 8
710

811
/* We need to keep keys and values */
9-
typedef struct _hashmap_element {
12+
typedef struct {
1013
const char *key;
1114
bool in_use;
1215
bool needs_free;

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Libmodule is a C library targeting linux aiming to let developers easily create modular C projects in a way which is both simple and elegant.
99
You will write less code, focusing on what really matters.
1010

11-
**Please note that the library actually builds and works on macOS and BSD too.** See [Portability](https://github.com/FedeDP/libmodule#is-it-portable).
11+
**Please note that libmodule actually builds and works on macOS and BSD too, and probably other.** See [Portability](https://github.com/FedeDP/libmodule#is-it-portable).
1212

1313
## Is this an event loop or an actor lib?
1414

@@ -20,13 +20,15 @@ Indeed, libmodule was heavily inspired by my own actor library experience with [
2020
## Is it portable?
2121

2222
Yes, it is. Non-portable code is actually [compile-time-plugins](https://github.com/FedeDP/libmodule/tree/master/Lib/poll_plugins) based.
23-
On linux, libmodule's internal loop will use epoll, while on BSD and MacOS kqueue will be used.
24-
The downside is that any poll plugin must have epoll-like interface. This is a choice: I find epoll-like APIs to be much more powerful and enjoyable to use.
23+
On linux, libmodule's internal loop will use epoll, while on BSD and MacOS it will use kqueue.
24+
On other OS, cmake will fallback at looking for [libkqueue](https://github.com/mheily/libkqueue), a drop-in replacement for kqueue.
25+
Unfortunately, I am not able to test builds on other OS, and I could only check that libmodule can be built on Linux through libkqueue.
26+
If you wish to have libmodule working on your OS, please open an issue or (better) send a PR.
2527
Finally, it heavily relies upon gcc attributes that may or may not be available for your compiler.
26-
Builds on supported platforms are tested through [travis](https://github.com/FedeDP/libmodule#travis-ci).
28+
Linux and osx builds are tested through [travis](https://github.com/FedeDP/libmodule#travis-ci).
2729

2830
As I can only test on linux with epoll though, you are advised that other plugins may break or have weird bugs.
29-
*If anyone is interested in step up and test libmodule on non-linux platforms, I'd be very thankful*.
31+
*If anyone is interested in step up and test/maintain libmodule on non-linux platforms, I'd be very thankful*.
3032

3133
## Is there any documentation?
3234

@@ -55,7 +57,6 @@ So I thought that writing a library to achieve those same abstractions in a clea
5557
## Build dep and how to build
5658

5759
You only need cmake to build libmodule; it does not depend upon external software.
58-
Libmodule includes an [hashmap](https://github.com/petewarden/c_hashmap) implementation provided by Pete Warden (thank you!).
5960
To build, you only need to issue:
6061

6162
$ mkdir build

TODO.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
### Porting
2929
- [x] Add support for libkqueue -> this will let libmodule build on solaris and windows too
3030

31+
- [x] Update readme (multi platform + libkqueue mention)
32+
3133
- [ ] Release 3.1.0
3234

3335
## 3.2.0

cmake/FindKqueue.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ find_package_handle_standard_args(kqueue DEFAULT_MSG
1414
KQUEUE_INCLUDE_DIRS
1515
THREADS_FOUND
1616
)
17-

0 commit comments

Comments
 (0)