Releases: supahero1/shnet
Releases · supahero1/shnet
v1.3.4
- Fixed
Makefile
'sCOVERAGE
flag, - Added
data_storage_size()
, - Overhauled the
async
module. Now there's just oneasync_loop_shutdown()
function instead ofasync_loop_push_xxx()
andasync_loop_commit()
. Additionally, atomic variables and operations are no longer used in the module, - Updated the docs and test suites to reflect the above changes.
v1.3.3
- Add
PRESERVE_TESTS
flag for future development, - Improved
INSTALL
, - Improved CLI. It will no longer display percentages, since, apparently, erasing even one line in the terminal is a big deal and cannot be done easily, so the idea was dropped completely,
- Improved
Makefile
:in.
files will no longer keep triggering a rebuild (modification ofsed_in
),- Files are now output in the
DIR_OUT
directory while preserving their original directory tree relative to theDIR_IN
directory (preventing name clashing), - No longer needed to provide
BUILD_SRC
(optional) andBUILD_OUT
(deleted due to above).
v1.3.2
- Added limited CLI,
- Fixed the
threads
test (rare race condition), - Added more code coverage for the
tcp
module, - Exposed the
tcp_send_buffered()
socket function in thetcp
module (for testing purposes only), - Other minor improvements to the
tcp
module, - Fixed Makefile (again).
v1.3.1
- Header guards are now meaningful, in the format of
_shnet_PATH_TO_THE_FILE_AND_FILE_NAME_h_
, - Clarified C++ support in
README.md
, - Made
time_thread()
a global declaration likeasync_thread()
, - Fixed compilation error where
sed_in
andunsed_in
weren't given a proper EXECUTABLE flag, - Other small changes.
v1.3
This release obsoletes all previous releases. It changes a lot of API and old behavior. It also changed the file system and building process of the library.
And it's not done yet. The next release, the TLS module will be brought back to life, along with a new CLI with tons of options.
All changes:
- Whole new build system. Makefiles are now in every folder that building takes place and they only require a few lines of code to compile lots of files.
- Whole new library structure in file system.
- Relicensed to Apache License 2.0 (previously MIT).
- New extended tests. The library has over 95% code coverage now.
- A lot of bug fixes.
- Redundant or not working code was removed.
- Rewrote documentation. Also, now every module has a note saying what other modules it depends on.
- Both
error
andtest
modules are now full (not header only anymore). - Now compatible with C++ when compiling with GCC. However, you MUST NOT modify any atomic variables in the underlying code's structures. Only modify what the documentation says you can.
- Removed event loop's ability to simulate events (redundant).
- Added
shnet_malloc()
,shnet_calloc()
, andshnet_realloc()
. - Changed the order of arguments in TCP server's
on_event
. - Closing a TCP server now will always succeed.
- TCP servers will now never lose any events (don't know if they ever could, but now they certainly won't).
- Changed names of a lot of
time
functions to be shorter. - Changed the way how TCP deals with multithreading. Now it properly uses full mutex locks instead of mere atomic operations. Moreover, the locks don't really add much new contention.
- Added special cases to
*_resize()
functions for size0
andstructure.size
. In the first case, the functions will no longer throw an error, but will instead free the structure. In the second case, they will go the fast path and not do anything. data_storage_drain()
no longer returns a value denoting if the storage is free or not. Usedata_storage_is_empty()
instead.- Fortified some
sem_wait()
's. Now they won't break everything if an interrupt arrives at the thread blocked at the function. - Every file now has a newline at the end of them.
- All documentation (besides code within it), license, README, Makefiles and INSTALL now have line width limit set to 80.
And probably more changes on top of the above, but forgot to mention them.
v1.2.1
v1.2
- LOTS of tests added
- Most modules were fundamentally rewritten, see
docs/c
to learn more about their current state. Too long to list all of the changes here - Extensive documentation added, covering every module in detail (
docs/
) - Added C++ support (Clang only)
- Changed the directory structure of the library to allow for better layout of files
pre4-v1.2
ALL PREVIOUS RELEASES ARE NOW OBSOLETE AND CONSIDERED UNSTABLE AND UNUSABLE FOR PRODUCTION!
See pre-v1.2 release for details.
Existing modules should be pretty stable and MAY be used for production, although the docs for the tcp
module aren't full yet.
List of changes:
- Fixed a bug causing
time_manager
's thread to basically eat up the CPU (mismatch in clock types).
pre3-v1.2
ALL PREVIOUS RELEASES ARE NOW OBSOLETE AND CONSIDERED UNSTABLE AND UNUSABLE FOR PRODUCTION!
See pre-v1.2 release for details.
Existing modules should be pretty stable and MAY be used for production, although the docs for the tcp
module aren't full yet.
List of changes:
- Added docs for the
net
module, partially for thetcp
module as well. net_address_to_string()
now can't fail.- Epoll thread functions now don't have asynchronous cancellability, since that's dangerous. Instead, they have a plenty of cancellation points scattered around them.
- Removed
net_epoll_shutdown()
andnet_epoll_shutdown_async()
as they were misleading compared to their equivalents in thethreads
module. Edited thetcp
module to include this change.
pre2-v1.2
ALL PREVIOUS RELEASES ARE NOW OBSOLETE AND CONSIDERED UNSTABLE AND UNUSABLE FOR PRODUCTION!
See pre-v1.2 release for details.
Existing modules should be pretty stable and MAY be used for production, although there are no docs for the net
and tcp
modules yet.
Read README for some of the changes or new functions that are briefly mentioned here.
List of changes:
- Remove useless dependencies used by old modules from MAKEFILE.
- Reworked the README to include better documentation and examples as well as better overall organisation. It no longer mentions old modules.
- Added new tests, improved coverage of existing ones, improved quality of code of tests.
debug
:
- Create
debug_free()
to be able to really see no memory leaks on Valgrind tests.
heap
:
- Added
heap_pop_()
to quickly remove the root without returning it to the application. - CODE BREAKER: Tweaked
heap_peak()
to start indexing from 0 instead of 1. - Added
heap_peak_rel()
as a function resolving toheap_peak()
, but counting with0, 1, 2, ...
instead of0, item_size, item_size * 2, ...
. - Added
heap_abs_idx()
to convert pointer to an item to its index in the heap to use in other functions.
[CODE BREAKER] refheap
:
- Rewrote it slightly to be much more similar to the
heap
module. - Fixed multiple inconsistencies:
refheap_resize()
now is using multiples ofrefheap.item_size
just like heaps,- Added
refheap_pop_()
to stay up-to-date with heaps, - Fixed multiple reference inconsistencies leading to various functions not being able to cooperate with each other in a viable way.
- Fixed
refheap_delete()
- previously it could potentially break the whole heap structure if lucky enough. - Added
refheap_inject()
to be able to modify a reference of a node in the heap. - Added
refheap_inject_rel()
, which is the same as above, but is counting by 1 instead of byitem_size
. - Added
refheap_min
andrefheap_max
to reflectheap_min
andheap_max
respectively.
threads
:
- Added
thread_cancellation_disable()
,thread_cancellation_enable()
,thread_cancellation_async()
, andthread_cancellation_deferred()
, to make it easier to modify the cancellability state and type of the current thread. - Remade the system of spawning new threads for
struct threads
. Now it will use less memory and should generally be safer. - Added asynchronous versions of
thread_stop()
,threads_remove()
, andthreads_shutdown()
. - NEW: Thread pool. Easily make threads execute various functions. Super fast and flexible. Perfectly compatible with
struct thread
andstruct threads
.
time
:
- Added a little bit of caching in the main time manager thread to avoid excess time-fetching calls.
- Decreased the size of timer references by 8 bytes.
- Added
time_manager_lock()
andtime_manager_unlock()
locking & unlocking functions along withraw
variations of all timeout and interval functions. See README to learn more. Also see thethreads
module in the readme, thread pool section. - Added
time_manager_resize_timeouts()
andtime_manager_resize_intervals()
as well as the raw versions of these functions to not userefheap_resize()
since it no longer would work the way it did. time_manager_begin_modifying_xxx()
was renamed totime_manager_open_xxx()
.time_manager_end_modifying_xxx()
was renamed totime_manager_close_xxx()
.- Fix
time_manager_cancel_interval()
crashing the program if the interval has already been cancelled before.
net
:
- Small changes caused by changes to the above modules.
tcp
:
- Minor improvements of the code.