Andrey Semashev
5b9bf9d9e0
Cosmetic changes.
2016-04-14 19:32:04 +03:00
Andrey Semashev
063539ece8
Corrected a typo in the comment.
2016-04-14 19:32:04 +03:00
Andrey Semashev
51af4eeae9
Fixes for Windows.
2016-04-14 19:32:04 +03:00
Andrey Semashev
05826649a0
Extracted platform-specific logic regarding interprocess object names to a separate object_name wrapper. Use this wrapper wherever interprocess queue name was used. Added a test for the wrapper. Extracted auto_handle to a separate header.
2016-04-14 19:32:04 +03:00
Andrey Semashev
48079e0fcb
Renamed stop() and reset() to stop_local() and reset_local() to emphasize that the methods operate only on the local queue object. Added proper documentation for the class.
2016-04-14 19:32:04 +03:00
Andrey Semashev
96407384c4
Fixed an exception when checking if the semaphore counter is zero. Moved UTF conversion function to code_conversion.cpp. Moved access permission constants to Boost.WinAPI.
2016-04-14 19:32:04 +03:00
Andrey Semashev
d5b4dbb357
Added a workaround for a linking problem with older MSVC.
2016-04-14 19:32:04 +03:00
Andrey Semashev
65076ea6e8
Fixed compilation on MSVC-8.
2016-04-14 19:32:03 +03:00
Andrey Semashev
30e8ef0a92
Fixed incorrect assert.
2016-04-14 19:32:03 +03:00
Andrey Semashev
89d56bc12a
Compilation fixes on Windows.
2016-04-14 19:32:03 +03:00
Andrey Semashev
09ea7f70d7
Working on the Windows implementation of reliable interprocess queue. Removed unused keywords. Ported to Boost.Align implementation of size alignment function.
2016-04-14 19:32:03 +03:00
Andrey Semashev
24c70e7f29
Cleaned up the Jamfile and added a config macro for disabling IPC queues. Removed -march compiler flags where possible as they may override the user's choice. Removed the log-api feature as it no longer makes sense (the library is configured by enabling/disabling the particular sinks). Some renaming and cleanup.
2016-04-14 19:32:03 +03:00
Andrey Semashev
e38b4fe87d
Moved platform-specific and setup library sources to different directories.
2016-04-14 19:32:03 +03:00
Andrey Semashev
b58d9707b3
Worker on the Windows version of the reliable interprocess queue.
2016-04-14 19:32:03 +03:00
Andrey Semashev
9799bb7621
Completed semaphore-based condition variable, started reliable interprocess queue rewrite for Windows. Added comments.
2016-04-14 19:32:03 +03:00
Andrey Semashev
e17849ed08
Modified AVX2 detection so that it is more portable on Windows.
2016-04-14 19:32:03 +03:00
Andrey Semashev
72a85f2861
Updated WinAPI includes.
2016-04-14 19:32:03 +03:00
Andrey Semashev
eafb7fd4d0
Extracted event implementation to a separate class. Working on condition variable implementation.
2016-04-14 19:32:03 +03:00
Andrey Semashev
ad7ced1485
Working on Windows interprocess synchronization primitives.
2016-04-14 19:32:03 +03:00
Andrey Semashev
82f240fded
Extracted common tools for IPC queues to separate headers. Added overloads of receive functions for arrays. Changed return value of remove() to void and added comments about implementation. Started working on Windows implementation.
2016-04-14 19:32:03 +03:00
Andrey Semashev
6999c02a96
Reverted interprocess mutex to normal.
2016-04-14 19:32:03 +03:00
Andrey Semashev
1aacc3e746
Fixed bugs, updated tests.
2016-04-14 19:32:03 +03:00
Andrey Semashev
fced50d4e0
Added mixing the queue type FOURCC to the ABI tag.
2016-04-14 19:32:03 +03:00
Andrey Semashev
0e2965b4ee
More robust conversions if pthread_key_t is a signed integer.
2016-04-14 19:32:03 +03:00
Andrey Semashev
f596af6e01
Added remove method to the interprocess message queue.
2016-04-14 19:32:03 +03:00
Andrey Semashev
48721d0dc0
Added exception throw methods that take C-style strings for messages.
...
This results in mode compact code at throw sites as often the exception
is thrown with a constant string literal as the description. std::string
construction was effectively duplicated at every throw site.
Also added constructors taking const char* to bad_alloc-derived
exceptions to remove one std::string allocation.
2016-04-14 19:32:03 +03:00
Andrey Semashev
b909c5bdb3
Added a slightly more optimal implementation for the case when pthread_key_t is an integer, like on Linux.
2016-04-14 19:32:03 +03:00
Andrey Semashev
83e7e33646
Removed union-based type punning. Added result checks for pthread_setspecific.
2016-04-14 19:32:03 +03:00
Andrey Semashev
b284e68200
Moved queue overflow policy handling to the IPC queue. Compilation fixes.
2016-04-14 19:32:03 +03:00
Andrey Semashev
60c33d501e
Implemented receiving messages. Working on the updated sink backend interface.
2016-04-14 19:32:03 +03:00
Andrey Semashev
9fb7b75415
Implemented interprocess queue creation and opening.
2016-04-14 19:32:03 +03:00
Andrey Semashev
84b45f78a6
Continuing renaming files.
2016-04-14 19:32:03 +03:00
Andrey Semashev
51da22b2e6
Extracted open_mode and permissions to separate headers.
2016-04-14 19:32:03 +03:00
Andrey Semashev
489ac05ddd
Extracting interprocess message queue to separate headers/sources.
2016-04-14 19:32:03 +03:00
Andrey Semashev
9f1978619b
Extracted permissions wrapper to a separate header. Avoid using shared_ptr on Windows and add interop with Boost.Interprocess.
2016-04-14 19:32:03 +03:00
Andrey Semashev
0cc56f385e
Trim trailing spaces.
2016-04-14 19:32:02 +03:00
Lingxi-Li
8d9002cab8
Add text_ipc_message_queue_backend
...
This new sink backend supports logging messages to an interprocess
message queue.
2016-04-14 19:32:02 +03:00
Andrey Semashev
5de58e8a61
Added documentation and comments.
2016-02-25 22:07:29 +03:00
Erich Keane
5b8575cfab
Added max_files to parser_utils and init_from_settings
2015-12-29 11:20:57 -08:00
Erich Keane
5234253333
Added max_files option to text_file_backend's file_collector
...
As requested here: https://svn.boost.org/trac/boost/ticket/8746
this commit introduces the boost::log::keywords::max_files keyword
and implements this functionality in the file collector.
Additionally, the non-keyword make_collector call has max_files added as
a uintmax_t parameter, which has a default value as to not break
existing code.
The purpose of this is to limit the total number of files in the
collected logs. If not specified, the limit will be
std::numeric_limits<uintmax_t>::max(), which is likely greater than the
capacity of the filesystem.
2015-12-29 11:07:41 -08:00
Andrey Semashev
1f32d51dce
Added branch prediction hints.
2015-12-20 23:12:35 +03:00
Andrey Semashev
a31ec74e51
Make sure that Windows API version is consistent for all sources.
...
Include winapi/config.hpp as soon as possible; avoid including even
Boost.Config before it so that it doesn't set Windows API version
accidentally by including some third party header. In all source files,
include detail/config.hpp or detail/setup_config.hpp first thing.
Moved all WinAPI config macros to the Jamfile.v2 and removed
windows_version.hpp as it was no longer needed. Also enabled inclusion of
windows.h while compiling the library.
Removed auto-linking with psapi.lib and advapi32.lib as it was no longer
working after ecf3114 . Added linking with advapi32.lib to Jamfile.v2.
2015-12-20 21:05:28 +03:00
Andrey Semashev
c6f09d69c8
Fixed compilation on POSIX-like systems. Ported GetTickCount64 emulation to Boost.Atomic and got rid of union-based type punning as it is formally an UB.
2015-12-20 18:15:38 +03:00
Andrey Semashev
388a3e2126
Switch more code to the WinAPI abstraction layer. Use GetModuleHandleW and get_proc_address everywhere to avoid compilation errors for Windows CE.
2015-12-20 17:26:34 +03:00
Andrey Semashev
88ec57deac
Avoid including unneeded Windows headers when SSSE2/AVX2 are not enabled. This hopefully fixes including a missing header on Windows CE.
2015-12-20 15:18:18 +03:00
Andrey Semashev
eeb9ddb1b8
Move some includes to more correct places.
2015-12-20 14:33:48 +03:00
Andrey Semashev
f667fdd8fd
Undef BOOST_AUTO_LINK_NOMANGLE after it's been used.
2015-12-20 14:32:13 +03:00
Andrey Semashev
f75dd58956
Merge pull request #20 from remote-tracking branch 'muggenhor/no-undesired-auto-linking' into develop.
2015-12-20 14:29:02 +03:00
Andrey Semashev
b5969e5233
Changed adaptive_mutex to use pthread_mutex_t. On systems that support it (Linux, FreeBSD, OpenBSD) PTHREAD_MUTEX_ADAPTIVE_NP is used, otherwise the default mutex type. This greatly imporoves performance in case of heavy thread contention: 100 threads - x2.7 records per second, 1000 threads - x4. Less contended cases are mostly unaffected.
2015-11-15 17:18:48 +03:00
Andrey Semashev
5434177322
Renamed spin_mutex.hpp to adaptive_mutex.hpp.
2015-11-15 16:12:13 +03:00