Files
SingularityViewer/indra/llcommon/CMakeLists.txt
Aleric Inglewood 006b319c3a Add AISyncClient<> (and AISyncServer).
A tool to synchronize objects:
Objects derived from AISyncClient can signal that they are
'ready' or 'not ready' for up to 4 events (using a bitmask)
at a time. Clients that signal to be ready for anything
at roughly the same time as other clients, and which return
the same 'hash' (a virtual function returning a 64bit value)
will be grouped together and receive events (by means of
virtual functions being called) to notify them of all clients
being ready or not for one of the events (syncevent1).
The other three events can be polled.

The memory usage is low (one pointer per client that points
to its AISyncServer object), servers are released to a cache
after about 100 ms (unless there is actual need for synchronization),
so there aren't much of those either.

The CPU usage is extremely low: all events are handled in
parallel in a 32 bit value (6 bits per event to count the
number of registered clients and the number of ready clients
for each event, and the remaining 8 bits to count the
number of reference pointers (which should only be a constant
higher, so that is overkill). To signal to a server that
a client has become ready or not is mostly a function call,
which then takes 1 clock cycle or so before returning.
Registration of a client is slightly more expensive as it
requires a pointer to be added to the end of a std::list.
This tool could easily be used as part of the graphics engine
(not that I intend to do that :p).
2014-04-04 15:15:26 +02:00

299 lines
5.6 KiB
CMake

# -*- cmake -*-
project(llcommon)
include(Cwdebug)
include(00-Common)
include(LLCommon)
include(APR)
include(Linking)
include(GoogleBreakpad)
include_directories(
${EXPAT_INCLUDE_DIRS}
${LLCOMMON_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
${BREAKPAD_INCLUDE_DIRECTORIES}
)
set(llcommon_SOURCE_FILES
aialert.cpp
aifile.cpp
aiframetimer.cpp
aisyncclient.cpp
aithreadid.cpp
imageids.cpp
indra_constants.cpp
ll_template_cast.h
llallocator.cpp
llallocator_heap_profile.cpp
llapp.cpp
llapr.cpp
llaprpool.cpp
llassettype.cpp
llavatarname.cpp
llbase32.cpp
llbase64.cpp
llcommon.cpp
llcommonutils.cpp
llcoros.cpp
llcrc.cpp
llcriticaldamp.cpp
llcursortypes.cpp
lldate.cpp
lldependencies.cpp
lldictionary.cpp
llerror.cpp
llerrorthread.cpp
llevent.cpp
lleventapi.cpp
lleventcoro.cpp
lleventdispatcher.cpp
lleventfilter.cpp
llevents.cpp
lleventtimer.cpp
llfasttimer_class.cpp
llfile.cpp
llfindlocale.cpp
llfixedbuffer.cpp
llfoldertype.cpp
llformat.cpp
llframetimer.cpp
llheartbeat.cpp
llindraconfigfile.cpp
llinitparam.cpp
llinstancetracker.cpp
llliveappconfig.cpp
lllivefile.cpp
lllog.cpp
llmd5.cpp
llmemory.cpp
llmemorystream.cpp
llmetrics.cpp
llmortician.cpp
lloptioninterface.cpp
llprocesslauncher.cpp
llprocessor.cpp
llptrto.cpp
llqueuedthread.cpp
llrand.cpp
llrefcount.cpp
llrun.cpp
llscopedvolatileaprpool.h
llsd.cpp
llsdparam.cpp
llsdserialize.cpp
llsdserialize_xml.cpp
llsdutil.cpp
llsecondlifeurls.cpp
llsingleton.cpp
llstacktrace.cpp
llstat.cpp
llstreamtools.cpp
llstring.cpp
llstringtable.cpp
llsys.cpp
llthread.cpp
llthreadsafequeue.cpp
lltimer.cpp
lluri.cpp
lluuid.cpp
llworkerthread.cpp
metaclass.cpp
metaproperty.cpp
reflective.cpp
timing.cpp
u64.cpp
)
set(llcommon_HEADER_FILES
CMakeLists.txt
aialert.h
aifile.h
aiframetimer.h
airecursive.h
aisyncclient.h
aithreadid.h
aithreadsafe.h
bitpack.h
ctype_workaround.h
doublelinkedlist.h
fix_macros.h
imageids.h
indra_constants.h
linden_common.h
linked_lists.h
llaccountingcost.h
llalignedarray.h
llagentconstants.h
llallocator.h
llallocator_heap_profile.h
llapp.h
llapr.h
llaprpool.h
llassettype.h
llassoclist.h
llatomic.h
llavatarconstants.h
llavatarname.h
llbase32.h
llbase64.h
llboost.h
llchat.h
llclickaction.h
llcommon.h
llcommonutils.h
llcoros.h
llcrc.h
llcriticaldamp.h
llcursortypes.h
lldarray.h
lldarrayptr.h
lldate.h
lldefs.h
lldeleteutils.h
lldependencies.h
lldepthstack.h
lldictionary.h
lldlinked.h
lldqueueptr.h
llendianswizzle.h
llenum.h
llerror.h
llerrorcontrol.h
llerrorlegacy.h
llerrorthread.h
llevent.h
lleventapi.h
lleventcoro.h
lleventdispatcher.h
lleventemitter.h
lleventfilter.h
llevents.h
lleventtimer.h
llextendedstatus.h
llfasttimer.h
llfasttimer_class.h
llfile.h
llfindlocale.h
llfixedbuffer.h
llfoldertype.h
llformat.h
llframetimer.h
llhandle.h
llhash.h
llheartbeat.h
llhttpstatuscodes.h
llindexedqueue.h
llindraconfigfile.h
llinitparam.h
llinstancetracker.h
llkeythrottle.h
lllinkedqueue.h
llliveappconfig.h
lllivefile.h
lllocalidhashmap.h
lllog.h
lllslconstants.h
llmap.h
llmd5.h
llmemory.h
llmemorystream.h
llmetrics.h
llmortician.h
llnametable.h
lloptioninterface.h
llpointer.h
llpreprocessor.h
llpriqueuemap.h
llprocesslauncher.h
llprocessor.h
llptrskiplist.h
llptrskipmap.h
llptrto.h
llqueuedthread.h
llrand.h
llrefcount.h
llregistry.h
llrun.h
llsafehandle.h
llsd.h
llsdparam.h
llsdserialize.h
llsdserialize_xml.h
llsdutil.h
llsecondlifeurls.h
llsimplehash.h
llsingleton.h
llskiplist.h
llskipmap.h
llsortedvector.h
llstack.h
llstacktrace.h
llstat.h
llstatenums.h
llstl.h
llstreamtools.h
llstrider.h
llstring.h
llstringtable.h
llstaticstringtable.h
llsys.h
llthread.h
llthreadsafequeue.h
lltimer.h
lltreeiterators.h
lltypeinfolookup.h
lluri.h
lluuid.h
sguuidhash.h
llversionviewer.h.in
llworkerthread.h
metaclass.h
metaclasst.h
metaproperty.h
metapropertyt.h
reflective.h
reflectivet.h
roles_constants.h
stdenums.h
stdtypes.h
string_table.h
stringize.h
timer.h
timing.h
u64.h
)
set_source_files_properties(${llcommon_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
list(APPEND llcommon_SOURCE_FILES ${cwdebug_SOURCE_FILES})
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
add_dependencies(llcommon prepare)
target_link_libraries(
llcommon
${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}
${APRUTIL_LIBRARIES}
${APR_LIBRARIES}
${EXPAT_LIBRARIES}
${ZLIB_LIBRARIES}
${WINDOWS_LIBRARIES}
${Boost_CONTEXT_LIBRARY}
${Boost_REGEX_LIBRARY}
${CORESERVICES_LIBRARY}
)
if (DARWIN)
# Don't embed a full path in the library's install name
set_target_properties(
llcommon
PROPERTIES
BUILD_WITH_INSTALL_RPATH 1
INSTALL_NAME_DIR "@executable_path/../Resources"
)
endif (DARWIN)