1b5b789342 
					 
					
						
						
							
							MXS-2208 Move trim-functions from maxscale to maxbase  
						
						... 
						
						
						
						log.h now includes string.hh, which is conceptually wrong, but
log.h will shortly disappear and be superceded by log.hh. 
						
						
					 
					
						2018-12-10 12:50:07 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						8d77ddec63 
					 
					
						
						
							
							MXS-2208 Add simple Http library  
						
						... 
						
						
						
						- Built on top of Curl
- Currently only GET 
						
						
					 
					
						2018-12-05 12:48:42 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						760f2ff34c 
					 
					
						
						
							
							Move alloc.cc to maxbase  
						
						... 
						
						
						
						Only renames the functions. Macro names are left as is to keep the diff
small. 
						
						
					 
					
						2018-12-03 10:20:45 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						a1e1ac0012 
					 
					
						
						
							
							Move string_printf to maxbase  
						
						... 
						
						
						
						Can be used in tests. 
						
						
					 
					
						2018-11-29 12:21:40 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						e371964f8b 
					 
					
						
						
							
							MXS-2057 Add log output for system test, and two random code fixes  
						
						
						
						
					 
					
						2018-11-14 16:20:42 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						ae1a062a58 
					 
					
						
						
							
							MXS-2160 Use CLOCK_MONOTONIC_COARSE  
						
						... 
						
						
						
						We measure time in milliseconds and as CLOCK_MONOTONIC_COARSE
provides 1ms granularity we should use that since it is cheaper. 
						
						
					 
					
						2018-11-13 16:44:30 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						c692c864e2 
					 
					
						
						
							
							MXS-2078 Take new statistics into use  
						
						
						
						
					 
					
						2018-11-08 10:44:32 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						13a0390de6 
					 
					
						
						
							
							MXS-2078 Add IntervalTimer  
						
						... 
						
						
						
						IntervalTimer is used for accumulating intervals (i.e. durations) over sections of code. 
						
						
					 
					
						2018-11-08 10:44:32 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						6dc038aa4e 
					 
					
						
						
							
							MXS-2137 Remove meaningsless statistics  
						
						... 
						
						
						
						The removed statistics variables have no meaning anymore and
were not updated.
Decided to simply drop the variable from the JSON output. It
gets far too rigid if fields of objects cannot be changed without
bumping the REST-API version. 
						
						
					 
					
						2018-11-06 09:49:25 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						7d03bee648 
					 
					
						
						
							
							Add type formatting helpers  
						
						... 
						
						
						
						Created the <maxbase/format.hh> header that contains various helper
functions for formatting values into human readable forms. Currently only
binary to human readable size conversion is implemented. 
						
						
					 
					
						2018-10-19 11:20:29 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						75f9921ca2 
					 
					
						
						
							
							Merge branch '2.2' into develop  
						
						
						
						
					 
					
						2018-10-02 10:18:09 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						c65edd1298 
					 
					
						
						
							
							Enhance StopWatch  
						
						... 
						
						
						
						Clean up, comments and enhancements. StopWatch lap() didn't mean lap-time, but elapsed time. Changed meaning to lap-time and added split() for split-time. 
						
						
					 
					
						2018-10-01 09:30:24 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						5132339b7b 
					 
					
						
						
							
							Fix race condition.  
						
						... 
						
						
						
						Change a counter (s_next_delayed_call_id) in Worker from class static to
class member to avoid race conditions on the variable. 
						
						
					 
					
						2018-09-25 17:07:06 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						6d82de811f 
					 
					
						
						
							
							Relax Average value access memory ordering  
						
						... 
						
						
						
						As there are no requirements with regards to the visibility of writes to
the Average, the access can be relaxed. 
						
						
					 
					
						2018-09-24 12:07:50 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						a94081067f 
					 
					
						
						
							
							Move Average into average.hh  
						
						... 
						
						
						
						Moved the class to a more appropriate place. 
						
						
					 
					
						2018-09-24 12:07:49 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						5ed3667f4a 
					 
					
						
						
							
							Document average.hh  
						
						... 
						
						
						
						Add documentation for the average classes. 
						
						
					 
					
						2018-09-24 12:07:49 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						4d792c3410 
					 
					
						
						
							
							MXS-1632: Add C++ wrappers for __atomic builtins  
						
						... 
						
						
						
						Using the __atomic functions makes it easy to increment fundamental types
atomically without converting them to std::atomic<T>. 
						
						
					 
					
						2018-09-18 15:21:54 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						9b0f016aba 
					 
					
						
						
							
							Fix minor formatting oversights  
						
						... 
						
						
						
						Code that was not formatted was merged into develop unformatted. 
						
						
					 
					
						2018-09-12 08:58:15 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						6938df0d62 
					 
					
						
						
							
							Use default member initializers in WORKER_STATISTICS  
						
						... 
						
						
						
						Makes the class simpler and removes the need for an explicit
constructor. Also switched to std::array to enable easy iteration over the
array. 
						
						
					 
					
						2018-09-10 14:15:10 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						94a567f4ca 
					 
					
						
						
							
							Remove redundant Worker method  
						
						... 
						
						
						
						The Worker::get_local_statistics was a duplicate of Worker::statistics. 
						
						
					 
					
						2018-09-10 14:14:21 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						d11c78ad80 
					 
					
						
						
							
							Format all sources with Uncrustify  
						
						... 
						
						
						
						Formatted all sources and manually tuned some files to make the code look
neater. 
						
						
					 
					
						2018-09-10 13:22:49 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						c447e5cf15 
					 
					
						
						
							
							Uncrustify maxscale  
						
						... 
						
						
						
						See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66. 
						
						
					 
					
						2018-09-09 22:26:19 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						d52885d68d 
					 
					
						
						
							
							MXS-1777 Cosmetic changes based on code reviews.  
						
						
						
						
					 
					
						2018-09-05 17:05:06 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						cdea8aa7be 
					 
					
						
						
							
							mxs-1777: maxutils additions  
						
						... 
						
						
						
						Adding classes for calculating averages. Update StopWatch to C++11. 
						
						
					 
					
						2018-09-05 17:05:06 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						e2ba7151b7 
					 
					
						
						
							
							MXS-2008 Enforce right initialization of maxbase  
						
						... 
						
						
						
						Now maxbase can only be initialized via maxbase::init(). 
						
						
					 
					
						2018-08-21 14:35:51 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						24ab3c099c 
					 
					
						
						
							
							Move top of the file  "#pragma once" to after the following comment (swap them). If the comment is a BPL update it to the latest one  
						
						
						
						
					 
					
						2018-08-21 13:13:15 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						e852dcacdd 
					 
					
						
						
							
							MXS-2008 Provide single entrypoint for initializing maxbase  
						
						... 
						
						
						
						Everything of maxbase can now be initialized by a call to
    maxbase_init();
(from a C-program) or
    maxbase::init();
from a C++-program and finalized with calls to either
maxbase_finish() or maxbase::finish(). Creating an instance
maxbase::MaxBase will take care of both operations. 
						
						
					 
					
						2018-08-21 10:02:39 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						88f1795412 
					 
					
						
						
							
							MXS-2008 Move Worker and MessageQueue to maxbase  
						
						
						
						
					 
					
						2018-08-21 10:02:39 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						0685276764 
					 
					
						
						
							
							Use correct functions in maxutils CMake files  
						
						... 
						
						
						
						The headers and the static library were installed unconditionally. 
						
						
					 
					
						2018-08-20 13:56:58 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						40a5ae81c7 
					 
					
						
						
							
							MXS-2008 Store worker as MXB_WORKER* and not void*  
						
						
						
						
					 
					
						2018-08-20 11:15:14 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						e0cb11151f 
					 
					
						
						
							
							MXS-2008 Move maxscale/worker.h to maxbase/worker.h  
						
						
						
						
					 
					
						2018-08-20 11:15:14 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						932956d5f6 
					 
					
						
						
							
							MXS-2008 Add maxbase/poll.[h|hh]  
						
						... 
						
						
						
						Remove maxscale/poll_core.h 
						
						
					 
					
						2018-08-20 11:15:14 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						aaad63ee5e 
					 
					
						
						
							
							MXS-2008 Move content of maxscale/platform.h to maxbase/cdefs.h  
						
						... 
						
						
						
						No good reason for keeping that platform adjustments anywhere
else but in cdefs.h. 
						
						
					 
					
						2018-08-20 11:15:14 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						d8255d0cac 
					 
					
						
						
							
							MXS-2017 Move maxscale::Semaphore to maxbase::Semaphore  
						
						
						
						
					 
					
						2018-08-17 15:53:54 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						c7a6d75ab9 
					 
					
						
						
							
							MXS-2014 Address review issues  
						
						
						
						
					 
					
						2018-08-17 10:59:37 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						15bf481120 
					 
					
						
						
							
							MXS-2014 Allow the header and footer to be adjusted  
						
						
						
						
					 
					
						2018-08-17 10:59:37 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						12e8f28907 
					 
					
						
						
							
							MXS-2014 Add mxb::Log class for convenience  
						
						... 
						
						
						
						In tests, the log can now be setup as
    int main()
    {
        mxb::Log log;
        ...
    }
That will initialize the log so that it logs to a file called
<program-name>.log in the current directory and finalize it
when the program exits. 
						
						
					 
					
						2018-08-17 10:59:37 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						be986d366a 
					 
					
						
						
							
							MXS-2014 Handle default OOM message properly  
						
						
						
						
					 
					
						2018-08-17 10:59:37 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						876cf7c86f 
					 
					
						
						
							
							MXS-2014 Temporarily fix broken token pasting  
						
						
						
						
					 
					
						2018-08-16 11:24:01 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						a586aa13c4 
					 
					
						
						
							
							MXS-2014 Add proper OOM support  
						
						... 
						
						
						
						Not that I think it ever will be needed... 
						
						
					 
					
						2018-08-16 09:59:43 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						85b68c439a 
					 
					
						
						
							
							MXS-2014 Still more cleanup of maxbase/log.h  
						
						
						
						
					 
					
						2018-08-16 09:59:43 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						6b6bbceb6e 
					 
					
						
						
							
							MXS-2014 Add maxbase/assert.h  
						
						... 
						
						
						
						Basically a copy of maxscale/debug.h, but with some name changes.
- ss_dassert      -> mxb_assert
- ss_info_dassert -> mxb_assert_message
- ss_debug        -> MXB_AT_DEBUG 
						
						
					 
					
						2018-08-16 09:59:43 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						52e6e10e28 
					 
					
						
						
							
							MXS-2014 Remove duplicate function  
						
						... 
						
						
						
						Two functions that essentially did the same thing, but had
slightly different name. 
						
						
					 
					
						2018-08-16 09:58:00 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						b4912a942f 
					 
					
						
						
							
							MXS-2014 Add missing MXB_[BEGIN|END]_DECLS  
						
						
						
						
					 
					
						2018-08-16 09:58:00 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						a191ed85a2 
					 
					
						
						
							
							MXS-2014 Expose everything needed by the MaxScale log manager  
						
						
						
						
					 
					
						2018-08-16 09:58:00 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						1a6eb8165a 
					 
					
						
						
							
							MXS-2014 Add log.[h|cc] to maxbase  
						
						... 
						
						
						
						Almost a verbatim copy of log_manager.[h|cc] with mxs changed
to mxb. The changes allow the MaxScale log manager to be moved
on top of this implementation. 
						
						
					 
					
						2018-08-16 09:58:00 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						17418572f9 
					 
					
						
						
							
							MXS-2014 Move maxscale/jansson.h to maxbase/jansson.h  
						
						
						
						
					 
					
						2018-08-16 09:58:00 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						be4f9125f0 
					 
					
						
						
							
							Fix mxb_strerror  
						
						... 
						
						
						
						The function should not be an inline function with a static variable. This
appears to cause problems on at least Debian Wheezy and is likely to cause
odd behavior on other platforms.
Also renamed the file to <maxbase/string.h> to better mirror how the
<string.h> file behaves. 
						
						
					 
					
						2018-08-15 14:58:46 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						f3f802cabe 
					 
					
						
						
							
							MXS-2008 Move maxscale/atomic.h to maxbase/atomic.h  
						
						
						
						
					 
					
						2018-08-15 08:44:39 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						d53bc9d3be 
					 
					
						
						
							
							MXS-2008 Move maxscale/semaphore.h to maxbase/semaphore.h  
						
						
						
						
					 
					
						2018-08-15 08:41:45 +03:00