vine
21 months agoA wide variety of changes (the perfect commit) master
Miles Rout [Wed, 26 Aug 2020 05:52:00 +0000 (17:52 +1200)]
A wide variety of changes (the perfect commit)

- Create a new build system where the different build options
  (debug/release/valgrind/ASan-UBSan) put build artifacts into different
  directories.  This solves the problem of trying to detect when the
  build options have changed and rebuild.
- Rename struct field names to have a common prefix that is unique to
  each structure, generally derived from the struct type name.  This is
  obviously a tradeoff, because in some circumstances it's just noise
  (e.g. t->t_pairs[0].tkv_key->tk_obj instead of t->pairs[0].key->obj)
  but I find that overall it improves readability.
- Create a new allocator, the slab allocator.  Technically this isn't
  actually an allocator, but an object pool.  It isn't usable as
  a struct alloc * like the other allocators.

21 months agoImprove strings and allocators
Miles Rout [Mon, 24 Aug 2020 05:21:12 +0000 (17:21 +1200)]
Improve strings and allocators

21 months agoSwitch entirely to 64-bit hashing
Miles Rout [Mon, 24 Aug 2020 04:05:33 +0000 (16:05 +1200)]
Switch entirely to 64-bit hashing

There are now just two hash functions: fnv1a and fnv1a_nt.  The only
difference between them is that fnv1a operates on a byte array specified
by a ptr/len pair while fnv1a_nt operates on a nul-terminated byte
array.

Instead of having a 64-bit hash function based on FNV1A_64 and a 32-bit
hash function using XOR-folded FNV1A_64, there is now just a 64-bit hash
function based on XOR-folded FNV1A_128. For now this is only implemented
using GCC unsigned __int128, but could be implemented for a wide variety
of platforms easily.

21 months agoExtend and clean up object system
Miles Rout [Sun, 23 Aug 2020 11:47:05 +0000 (23:47 +1200)]
Extend and clean up object system

struct object is now union object, and there are now
vobject_{copy,deinit,delete} functions available

21 months agoAdd sanitiser build mode (asan/ubsan)
Miles Rout [Sun, 23 Aug 2020 11:46:10 +0000 (23:46 +1200)]
Add sanitiser build mode (asan/ubsan)

21 months agoCompletely rework object system
Miles Rout [Sun, 23 Aug 2020 07:42:16 +0000 (19:42 +1200)]
Completely rework object system

21 months agoWIP
Miles Rout [Sat, 22 Aug 2020 05:46:51 +0000 (17:46 +1200)]
WIP

21 months agoDocumentation/formatting changes
Miles Rout [Sat, 22 Aug 2020 05:44:36 +0000 (17:44 +1200)]
Documentation/formatting changes

22 months agoWIP
Miles Rout [Mon, 29 Jun 2020 04:02:57 +0000 (16:02 +1200)]
WIP

23 months agoAdd prerequisites to 'tags' target in Makefile
Miles Rout [Sat, 13 Jun 2020 15:14:19 +0000 (03:14 +1200)]
Add prerequisites to 'tags' target in Makefile

23 months agoFix printf-style format warnings
Miles Rout [Sat, 13 Jun 2020 15:12:48 +0000 (03:12 +1200)]
Fix printf-style format warnings

23 months agoRename 'system' to 'subsystem' in log (sub)system
Miles Rout [Sat, 13 Jun 2020 11:40:02 +0000 (23:40 +1200)]
Rename 'system' to 'subsystem' in log (sub)system

23 months agoMove container_of macro to a new header
Miles Rout [Sat, 13 Jun 2020 11:33:35 +0000 (23:33 +1200)]
Move container_of macro to a new header

23 months agoChange README and docs/
Miles Rout [Fri, 12 Jun 2020 23:21:07 +0000 (11:21 +1200)]
Change README and docs/

23 months agoMove to intrusive queue system
Miles Rout [Fri, 12 Jun 2020 12:09:50 +0000 (00:09 +1200)]
Move to intrusive queue system

2 years agoRename fibre_queue to fibre_store
Miles Rout [Sat, 22 Feb 2020 11:05:10 +0000 (00:05 +1300)]
Rename fibre_queue to fibre_store

2 years agoAdd TODO for MADV_DONTNEED of fibre stacks on ret
Miles Rout [Sat, 22 Feb 2020 09:24:19 +0000 (22:24 +1300)]
Add TODO for MADV_DONTNEED of fibre stacks on ret

2 years agoGeneralise fibre_queue_* functions
Miles Rout [Sat, 22 Feb 2020 08:55:08 +0000 (21:55 +1300)]
Generalise fibre_queue_* functions

2 years agoRename fibre_list to fibre_queue
Miles Rout [Sat, 22 Feb 2020 08:41:05 +0000 (21:41 +1300)]
Rename fibre_list to fibre_queue

2 years agoClean up src/{vine,fibre}.c a little
Miles Rout [Wed, 19 Feb 2020 09:50:21 +0000 (22:50 +1300)]
Clean up src/{vine,fibre}.c a little

2 years agoAdd fibres
Miles Rout [Sun, 16 Feb 2020 15:06:58 +0000 (04:06 +1300)]
Add fibres

2 years agoMove documentation from headers to docs/
Miles Rout [Sun, 16 Feb 2020 03:51:21 +0000 (16:51 +1300)]
Move documentation from headers to docs/

2 years agoAdd CODING-STYLE
Miles Rout [Sat, 15 Feb 2020 22:30:43 +0000 (11:30 +1300)]
Add CODING-STYLE

2 years agoImplement fibres (green threads)
Miles Rout [Sat, 15 Feb 2020 13:09:26 +0000 (02:09 +1300)]
Implement fibres (green threads)

2 years agoAdd function to simplify src/vine.c
Miles Rout [Tue, 11 Feb 2020 05:23:33 +0000 (18:23 +1300)]
Add function to simplify src/vine.c

2 years agoImplement strings that keep their views alive
Miles Rout [Tue, 11 Feb 2020 04:19:49 +0000 (17:19 +1300)]
Implement strings that keep their views alive

2 years agoMake it compile on clang
Miles Rout [Tue, 11 Feb 2020 03:01:51 +0000 (16:01 +1300)]
Make it compile on clang

2 years agoAdd proper header guards enforcing #include order
Miles Rout [Tue, 11 Feb 2020 02:41:08 +0000 (15:41 +1300)]
Add proper header guards enforcing #include order

2 years agoChange coding style
Miles Rout [Mon, 10 Feb 2020 12:18:59 +0000 (01:18 +1300)]
Change coding style

2 years agoAdd FNV1a hash function
Miles Rout [Mon, 10 Feb 2020 12:18:24 +0000 (01:18 +1300)]
Add FNV1a hash function

2 years agoRemove testing code
Miles Rout [Mon, 10 Feb 2020 11:39:03 +0000 (00:39 +1300)]
Remove testing code

2 years agoFinish {alloc,alloc_buf,str} designs
Miles Rout [Mon, 10 Feb 2020 07:24:22 +0000 (20:24 +1300)]
Finish {alloc,alloc_buf,str} designs

2 years agoStrings and allocators
Miles Rout [Sun, 9 Feb 2020 07:20:03 +0000 (20:20 +1300)]
Strings and allocators

2 years agoMore details on strings and error handling
Miles Rout [Fri, 29 Nov 2019 05:27:02 +0000 (18:27 +1300)]
More details on strings and error handling

2 years agoMore design details
Miles Rout [Thu, 28 Nov 2019 06:54:39 +0000 (19:54 +1300)]
More design details

2 years agoAdd initial code
Miles Rout [Wed, 27 Nov 2019 06:58:41 +0000 (19:58 +1300)]
Add initial code

2 years agoInitial commit
Miles Rout [Wed, 27 Nov 2019 06:12:48 +0000 (19:12 +1300)]
Initial commit