Branch: refs/heads/dlopen
Home:
https://github.com/fabbione/kronosnet
Commit: 72eaa2e3a513e6e525c795a390cd58a8262ce941
https://github.com/fabbione/kronosnet/commit/72eaa2e3a513e6e525c795a390cd58…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2017-08-26 (Sat, 26 Aug 2017)
Changed paths:
M libknet/compress.c
M libknet/compress.h
M libknet/compress_bzip2.c
M libknet/compress_bzip2.h
M libknet/compress_lz4.c
M libknet/compress_lz4.h
M libknet/compress_lzma.c
M libknet/compress_lzma.h
M libknet/compress_lzo2.c
M libknet/compress_lzo2.h
M libknet/compress_zlib.c
M libknet/compress_zlib.h
Log Message:
-----------
[compress] centralize handling of libref in compress abstraction layer
the complexity come from a mix and match of those modules that
have/don't have .is_init/.init functions, and makes handling
more delicate.
This commit ensures that:
- library is loaded only once (makes load_lib mandatory for every modules)
- use knet_h->compress_int_data to track per handle init.
modules providing .is_init,.init don't need set anything there
unless they need to.
- modules don't need to track libref anymore but they must
provide a unload_lib/load_lib.
- library are closed only once libref is 0.
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>