Nils O. Selåsdal
|
8749270ca4
|
Add DStr docs.
Small test changes
|
2013-12-04 20:32:06 +01:00 |
|
Nils O. Selåsdal
|
6fdaa83dee
|
Run DStr tests
|
2013-12-04 19:58:59 +01:00 |
|
Nils O. Selåsdal
|
bbbe912fba
|
Initial version of struct DStr
|
2013-12-04 19:58:38 +01:00 |
|
Nils O. Selåsdal
|
2f93ea8ad2
|
Limit overallocation to [8-256] bytes
|
2013-12-03 19:43:27 +01:00 |
|
Nils O. Selåsdal
|
f6afc8ba57
|
Allow UC_MIN(UC_MAX(x,y),z), though only one nesting can be done.
|
2013-12-03 19:42:43 +01:00 |
|
Nils O. Selåsdal
|
43a14a5149
|
Add comments to compare/swap function
|
2013-12-03 17:30:37 +01:00 |
|
Nils O. Selåsdal
|
2b022aeddc
|
Make the heapsort test comparison work..
|
2013-12-03 17:29:00 +01:00 |
|
Nils O. Selåsdal
|
4caf2573fb
|
Check of count or size is 0 in heapsort
|
2013-12-03 14:29:57 +01:00 |
|
Nils O. Selåsdal
|
70fb352656
|
Fix heapsort, add test
|
2013-12-03 11:30:09 +01:00 |
|
Nils O. Selåsdal
|
a5662a2edd
|
Revert "Remove the wrong heapsort implementation"
This reverts commit aa04b6ae33.
|
2013-12-03 10:59:56 +01:00 |
|
Nils O. Selåsdal
|
aa04b6ae33
|
Remove the wrong heapsort implementation
|
2013-12-02 21:51:26 +01:00 |
|
Nils O. Selåsdal
|
96934d7cf7
|
minor name changes to make more sense
|
2013-12-01 21:12:18 +01:00 |
|
Nils O. Selåsdal
|
2ac412917a
|
Fix comment
|
2013-11-30 13:42:49 +01:00 |
|
Nils O. Selåsdal
|
6dc59ccbf8
|
Add macros for iterating the containing entry
|
2013-11-30 13:40:05 +01:00 |
|
Nils O. Selåsdal
|
bcafaace29
|
Fix the log level string of NONE.
|
2013-11-30 04:48:26 +01:00 |
|
Nils O. Selåsdal
|
ec63c1e88f
|
Guard the UC_DEBUGF/UC_DEBUGFR with do{}while(0)
|
2013-11-30 04:39:59 +01:00 |
|
Nils O. Selåsdal
|
6706d59b4b
|
undef UC_INLINE
|
2013-11-30 03:26:45 +01:00 |
|
Nils O. Selåsdal
|
ad90215452
|
Add UC_TAILQ_CONTAINER. Fix spelling error
|
2013-11-30 03:24:43 +01:00 |
|
Nils O. Selåsdal
|
f9ef8d620f
|
style cleanups
|
2013-11-28 23:30:44 +01:00 |
|
Nils O. Selåsdal
|
44b86f2fde
|
Add FIRST/NEXT/LAST/PREV macros, analogous to sys/queue.h
|
2013-11-28 23:21:56 +01:00 |
|
Nils O. Selåsdal
|
f5d918e77d
|
Add a _move_head and _move_tail function to move a node
Also be more consisten in cometns about tailq instead of list
|
2013-11-28 22:50:03 +01:00 |
|
Nils O. Selåsdal
|
80d73629bf
|
add uc_tailq_link() and use it in uc_tailq_remove()
|
2013-11-28 20:01:25 +01:00 |
|
Nils O. Selåsdal
|
6156fcbbb5
|
Add tailq example
|
2013-11-28 18:30:14 +01:00 |
|
Nils O. Selåsdal
|
4a2c524e14
|
Add tailq linked list
|
2013-11-28 18:30:01 +01:00 |
|
Nils O. Selåsdal
|
04f101c699
|
initialize peer to Unknown
|
2013-11-26 23:58:50 +01:00 |
|
Nils O. Selåsdal
|
66942b43dc
|
Initializze p1..p4_off, to silence a (wrong) compiler warning
|
2013-11-26 22:39:18 +01:00 |
|
Nils O. Selåsdal
|
e7d7f4b862
|
Add -k argument to test_runner to specify running only one test suite
alter --xml of test_runner to just -x
|
2013-11-26 18:17:07 +01:00 |
|
Nils O. Selåsdal
|
59f6d99419
|
Remove a wrong test in test_mbuf.c
|
2013-11-25 23:42:29 +01:00 |
|
Nils O. Selåsdal
|
e911fcfa8b
|
Improve comments
|
2013-11-25 23:39:41 +01:00 |
|
Nils O. Selåsdal
|
dbe2f174a8
|
Add uc_mbuf_extend_headroom function, for growing an mbuf
|
2013-11-25 23:38:13 +01:00 |
|
Nils O. Selåsdal
|
306a3d2a90
|
Add uc_mbuf_head accessor function
|
2013-11-25 20:52:43 +01:00 |
|
Nils O. Selåsdal
|
3d2e0ce540
|
tabs->spaces
|
2013-11-22 20:06:05 +01:00 |
|
Nils O. Selåsdal
|
e808bcde4d
|
Fix typo
|
2013-11-22 17:35:50 +01:00 |
|
Nils O. Selåsdal
|
88032c6218
|
use a do{}while(0) guard in TRACEF when DEBUG is not defined
|
2013-11-22 14:25:50 +01:00 |
|
Nils O. Selåsdal
|
28177a092c
|
Fix uc_set_tcp_keepalive_cfg, it really wasnt working :-(
|
2013-11-21 21:31:33 +01:00 |
|
Nils O. Selåsdal
|
780a90d6da
|
Fix InstallPerm method so it will also work with
--install-sandbox
|
2013-11-19 18:35:11 +01:00 |
|
Nils O. Selåsdal
|
8083fa54cf
|
Split uc_human_bytesz in uc_human_bytesz_dec/uc_human_bytesz_bin, for
decimal and binary conversion (http://en.wikipedia.org/wiki/Megabyte)
|
2013-11-19 11:33:43 +01:00 |
|
Nils O. Selåsdal
|
ac95b1002c
|
use ck_assert_int_eq for a bit better debugging help
|
2013-11-18 23:49:39 +01:00 |
|
Nils O. Selåsdal
|
37ebc2a75b
|
Remove redundant assignment
|
2013-11-17 23:06:39 +01:00 |
|
Nils O. Selåsdal
|
0f88bb3190
|
Comment the UC_DIV_ROUND_UP macro
|
2013-11-17 21:44:19 +01:00 |
|
Nils O. Selåsdal
|
938ffe330d
|
Use unsigned types instead of long for threadqueue
|
2013-11-17 21:02:02 +01:00 |
|
Nils O. Selåsdal
|
0679a4a2ad
|
Fix undefined integer behavior due to promotion rules
|
2013-11-16 04:36:50 +01:00 |
|
Nils O. Selåsdal
|
9c440723e8
|
Add C++ guards
|
2013-11-14 13:30:21 +01:00 |
|
Nils O. Selåsdal
|
8fd26cd810
|
Add a compiler and hardware memory barrier macro
|
2013-11-13 23:18:42 +01:00 |
|
Nils O. Selåsdal
|
bae3027720
|
Merge branch 'dev' of ssh://box.fiane.intra/var/lib/git/libucore into dev
|
2013-11-13 18:16:46 +01:00 |
|
Nils O. Selåsdal
|
1d709faf20
|
Add a note about being fragile..
|
2013-11-13 18:07:41 +01:00 |
|
Nils O. Selåsdal
|
6b26812cf3
|
Only do one event at a time to a callback.
|
2013-11-09 11:06:19 +01:00 |
|
Nils O. Selåsdal
|
a4c6b65d5f
|
Replace goto with do while
|
2013-11-09 10:47:41 +01:00 |
|
Nils O. Selåsdal
|
9f563c0c7e
|
Reorder macro to be more consistent
|
2013-11-05 15:04:58 +01:00 |
|
Nils O. Selåsdal
|
410ae4ba81
|
Created a scripts folder
|
2013-10-29 22:27:50 +01:00 |
|
Nils O. Selåsdal
|
f0b4d46784
|
Generate the version string in scons, so it doesn't
have to be defined several potential places
|
2013-10-29 22:23:09 +01:00 |
|
Nils O. Selåsdal
|
eceda7be70
|
Generalize the backing type of bitvec
|
2013-10-28 23:21:26 +01:00 |
|
Nils O. Selåsdal
|
215035190e
|
Add --32 to scons , to force building 32 bit code
|
2013-10-28 20:00:56 +01:00 |
|
Nils O. Selåsdal
|
678378c2f4
|
Generate scons substitute info in top file
|
2013-10-28 19:02:47 +01:00 |
|
Nils O. Selåsdal
|
a5c984e00b
|
Merge branch 'dev'
|
2013-10-27 13:33:56 +01:00 |
|
Nils O. Selåsdal
|
08fa852cf6
|
Merge branch 'master' of ssh://box.fiane.intra/var/lib/git/libucore
|
2013-10-27 13:25:17 +01:00 |
|
Nils O. Selåsdal
|
8a44b591de
|
Docs for mbuf.flags
|
2013-10-26 23:00:32 +02:00 |
|
Nils O. Selåsdal
|
1b563e797b
|
Have check get the fork status from env. variable (set CK_FORK_GETENV
flag)
|
2013-10-24 22:28:17 +02:00 |
|
Nils O. Selåsdal
|
c1609c2a57
|
Poison the removed node in tests, to help ensure nothing fishy is going
on
|
2013-10-24 22:14:41 +02:00 |
|
Nils O. Selåsdal
|
0acb4789b0
|
Add FOREACH_SAFE macros + tests
|
2013-10-24 22:13:16 +02:00 |
|
Nils O. Selåsdal
|
45ecb3c1e0
|
Revert "Add iterator API". Will try to find a better API
This reverts commit 821399a61b.
|
2013-10-24 21:28:35 +02:00 |
|
Nils O. Selåsdal
|
821399a61b
|
Add iterator API
|
2013-10-24 21:27:31 +02:00 |
|
Nils O. Selåsdal
|
03124601d8
|
Test failing to find a hash node
|
2013-10-24 21:18:27 +02:00 |
|
Nils O. Selåsdal
|
49503804dd
|
Allow user to always (not just in debug mode) compile in UC_DEBUGXXX
log calls by defining UC_DEBUG_ALWAYS
|
2013-10-23 22:07:58 +02:00 |
|
Nils O. Selåsdal
|
2cd5d9d7a9
|
Comment the FOREACH macros
|
2013-10-18 19:43:05 +02:00 |
|
Nils O. Selåsdal
|
7ff33c113b
|
Test UC_HTABLE_FOR_EACH
|
2013-10-17 22:38:00 +02:00 |
|
Nils O. Selåsdal
|
b0172a365e
|
test uc_htable_clear. Add comments, fix uc_htable_next
|
2013-10-17 22:28:32 +02:00 |
|
Nils O. Selåsdal
|
0f0ae6dd1e
|
Add uc_htable_remove + test
|
2013-10-17 22:12:48 +02:00 |
|
Nils O. Selåsdal
|
6c76759355
|
Add more htable tests
|
2013-10-17 21:29:55 +02:00 |
|
Nils O. Selåsdal
|
9f41543fb1
|
hash table test
|
2013-10-17 21:00:57 +02:00 |
|
Nils O. Selåsdal
|
4b13f1f1c9
|
Merge branch 'dev' of /var/lib/git/libucore into dev
|
2013-10-17 21:00:32 +02:00 |
|
Nils O. Selåsdal
|
987db2d096
|
First iteration of hash table
|
2013-10-17 21:00:05 +02:00 |
|
Nils O. Selåsdal
|
b91d5870b8
|
Update rate_limit example
|
2013-10-16 19:23:16 +02:00 |
|
Nils O. Selåsdal
|
262958b8a0
|
Rework rate limit to only refill when needed
|
2013-10-16 19:22:53 +02:00 |
|
Nils O. Selåsdal
|
2d680052b2
|
Fix UC_DEBUGF
|
2013-10-16 01:46:50 +02:00 |
|
Nils O. Selåsdal
|
ee3dd22b0e
|
Convert logging to use UC_SRC_LOCATION
|
2013-10-16 01:44:36 +02:00 |
|
Nils O. Selåsdal
|
13567e3cd9
|
Add macro for stringifying __FILE__:__LINE__
|
2013-10-16 01:37:20 +02:00 |
|
Nils O. Selåsdal
|
934088ca4a
|
Remove ticket_cost member as it is no longer needed
|
2013-10-15 22:31:57 +02:00 |
|
Nils O. Selåsdal
|
0a36c669c6
|
More ratelimit optimizations
|
2013-10-15 21:35:10 +02:00 |
|
Nils O. Selåsdal
|
c1ef4af4ad
|
Changed test program
|
2013-10-15 20:14:35 +02:00 |
|
Nils O. Selåsdal
|
9c15b73774
|
Small optimization change when tickets < period
|
2013-10-15 20:14:15 +02:00 |
|
Nils O. Selåsdal
|
28514c0a57
|
More limits clarification
|
2013-10-15 15:44:12 +02:00 |
|
Nils O. Selåsdal
|
c84d903b4f
|
Assert that rate limit values are ok
|
2013-10-15 15:27:25 +02:00 |
|
Nils O. Selåsdal
|
f4e7ad0fe6
|
Note the limits on tickets and period
|
2013-10-15 15:23:32 +02:00 |
|
Nils O. Selåsdal
|
763032fb04
|
Greatly improve the rate limit algorithm, so it is correct for a low
ticket to period ratio.
|
2013-10-15 15:03:27 +02:00 |
|
Nils O. Selåsdal
|
41bb24bb61
|
Delete the silly bitvec _s functions
|
2013-10-14 19:01:56 +02:00 |
|
Nils O. Selåsdal
|
6058be1c07
|
Fix UC_STATIC_ASSERT
|
2013-10-14 18:03:17 +02:00 |
|
Nils O. Selåsdal
|
48678a9858
|
Use consisten header guard, prefixed with UC_
|
2013-10-13 17:37:28 +02:00 |
|
Nils O. Selåsdal
|
52eb710db7
|
Add rate limit test
|
2013-10-12 01:29:00 +02:00 |
|
Nils O. Selåsdal
|
3d93ec6091
|
Bump scaling to 1000.
Note the error in integer arithmetic
|
2013-10-12 01:28:20 +02:00 |
|
Nils O. Selåsdal
|
8a76210661
|
Comment rate_limit.h
|
2013-10-11 23:54:37 +02:00 |
|
Nils O. Selåsdal
|
9ca4a354ee
|
Fix calculating available tickets.
Help prevent overflow when there's long periods between calls
|
2013-10-10 01:06:49 +02:00 |
|
Nils O. Selåsdal
|
212fecae08
|
Move rate limit example to test/
|
2013-10-09 22:59:47 +02:00 |
|
Nils O. Selåsdal
|
06083a054e
|
Add rate limit API
|
2013-10-09 22:55:29 +02:00 |
|
Nils O. Selåsdal
|
08a50d8cfe
|
fix UC_ASSERT writing to wrong fd, and unterminated if
log more in UC_NOTREACHED
|
2013-10-08 17:39:44 +02:00 |
|
Nils O. Selåsdal
|
425062ad18
|
Add needed include files
|
2013-10-08 17:34:58 +02:00 |
|
Nils O. Selåsdal
|
1da7470e87
|
use UC_CONTAINER_OF
|
2013-10-05 20:37:13 +02:00 |
|
Nils O. Selåsdal
|
bb5e21d29b
|
add static strvec initializer macradd static strvec initializer macroo
|
2013-10-05 20:36:11 +02:00 |
|
Nils O. Selåsdal
|
1f4e41df3a
|
Test inserting priority messages
|
2013-10-05 00:56:41 +02:00 |
|
Nils O. Selåsdal
|
3da0591cc3
|
introduce --with-assertions to build a release with assertions enabled
|
2013-10-05 00:55:51 +02:00 |
|