Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance C #3243

Draft
wants to merge 16 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ a0b3021bdcf76859054fda8e30abb3ed47749e83
e2e37cced861b98de8c1a7c9c0d3a50d2d90e433
# multiple problems
5370a6d323e14d7b4e32a3f41ef78f7744e361c5
c99bb0ba4011b94d22ea2606459be008d4c5181e
22338aaa82f0f1e9eca47f480857f45e69b19b44
48 changes: 10 additions & 38 deletions autobuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2465,23 +2465,17 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
</map>
<key>threejs</key>
<map>
<key>copyright</key>
<string>Copyright © 2010-2021 three.js authors</string>
<key>license</key>
<string>MIT</string>
<key>license_file</key>
<string>LICENSES/THREEJS_LICENSE.txt</string>
<key>name</key>
<string>threejs</string>
<key>platforms</key>
<map>
<key>darwin64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>cfed00d8ea7265c035c2d86a234b28efb0b23756</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://github.com/secondlife/3p-three_js/releases/download/v0.132.2-b8f6746/threejs-0.132.2-darwin64-b8f6746.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
</map>
<key>linux64</key>
<key>common</key>
<map>
<key>archive</key>
<map>
Expand All @@ -2493,33 +2487,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>https://github.com/secondlife/3p-three_js/releases/download/v0.132.2-5da28d9/threejs-0.132.2-common-8454371083.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
</map>
<key>windows64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>4141710fccbd1ea2b3b53d00e189bdfa2ee9d441</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://github.com/secondlife/3p-three_js/releases/download/v0.132.2-b8f6746/threejs-0.132.2-windows64-b8f6746.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
<string>common</string>
</map>
</map>
<key>license</key>
<string>MIT</string>
<key>license_file</key>
<string>LICENSES/THREEJS_LICENSE.txt</string>
<key>copyright</key>
<string>Copyright © 2010-2021 three.js authors</string>
<key>version</key>
<string>0.132.2</string>
<key>name</key>
<string>threejs</string>
</map>
<key>tinygltf</key>
<map>
Expand Down
2 changes: 2 additions & 0 deletions indra/llcharacter/llcharacter.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ class LLCharacter

virtual void addDebugText( const std::string& text ) = 0;

virtual std::string getDebugName() const { return getID().asString(); }

virtual const LLUUID& getID() const = 0;
//-------------------------------------------------------------------------
// End Interface
Expand Down
9 changes: 9 additions & 0 deletions indra/llcommon/lldate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ std::string LLDate::asRFC1123() const
return toHTTPDateString (std::string ("%A, %d %b %Y %H:%M:%S GMT"));
}

std::string LLDate::toLocalDateString (std::string fmt) const
{
LL_PROFILE_ZONE_SCOPED;

time_t locSeconds = (time_t) mSecondsSinceEpoch;
struct tm * lt = localtime (&locSeconds);
return toHTTPDateString(lt, fmt);
}

std::string LLDate::toHTTPDateString (std::string fmt) const
{
LL_PROFILE_ZONE_SCOPED;
Expand Down
1 change: 1 addition & 0 deletions indra/llcommon/lldate.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class LL_COMMON_API LLDate
std::string asRFC1123() const;
void toStream(std::ostream&) const;
bool split(S32 *year, S32 *month = NULL, S32 *day = NULL, S32 *hour = NULL, S32 *min = NULL, S32 *sec = NULL) const;
std::string toLocalDateString (std::string fmt) const;
std::string toHTTPDateString (std::string fmt) const;
static std::string toHTTPDateString (tm * gmt, std::string fmt);
/**
Expand Down
8 changes: 8 additions & 0 deletions indra/llcommon/llprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,14 @@ class LLProcessorInfoDarwinImpl : public LLProcessorInfoImpl
{
getCPUIDInfo();
uint64_t frequency = getSysctlInt64("hw.cpufrequency");
if (!frequency)
{
auto tbfrequency = getSysctlInt64("hw.tbfrequency");
struct clockinfo clockrate;
auto clockrate_len = sizeof(clockrate);
if (!sysctlbyname("kern.clockrate", &clockrate, &clockrate_len, NULL, 0))
frequency = tbfrequency * clockrate.hz;
}
setInfo(eFrequency, (F64)frequency / (F64)1000000);
}

Expand Down
2 changes: 1 addition & 1 deletion indra/llcommon/threadpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ namespace LL
size_t threads=1,
size_t capacity=1024*1024,
bool auto_shutdown = true):
ThreadPoolBase(name, threads, new queue_t(name, capacity), auto_shutdown)
ThreadPoolBase(name, threads, new queue_t(name, capacity, false), auto_shutdown)
{}
~ThreadPoolUsing() override {}

Expand Down
25 changes: 14 additions & 11 deletions indra/llcommon/workqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ using Lock = LLCoros::LockType;
/*****************************************************************************
* WorkQueueBase
*****************************************************************************/
LL::WorkQueueBase::WorkQueueBase(const std::string& name):
super(makeName(name))
LL::WorkQueueBase::WorkQueueBase(const std::string& name, bool auto_shutdown)
: super(makeName(name))
{
// Register for status change events so we'll implicitly close() on viewer
// shutdown.
mStopListener = LLCoros::getStopListener(
"WorkQueue:" + getKey(),
[this](const LLSD&){ close(); });
if (auto_shutdown)
{
// Register for status change events so we'll implicitly close() on viewer
// shutdown.
mStopListener = LLCoros::getStopListener(
"WorkQueue:" + getKey(),
[this](const LLSD&) { close(); });
}
}

void LL::WorkQueueBase::runUntilClose()
Expand Down Expand Up @@ -136,8 +139,8 @@ void LL::WorkQueueBase::checkCoroutine(const std::string& method)
/*****************************************************************************
* WorkQueue
*****************************************************************************/
LL::WorkQueue::WorkQueue(const std::string& name, size_t capacity):
super(name),
LL::WorkQueue::WorkQueue(const std::string& name, size_t capacity, bool auto_shutdown):
super(name, auto_shutdown),
mQueue(capacity)
{
}
Expand Down Expand Up @@ -185,8 +188,8 @@ bool LL::WorkQueue::tryPop_(Work& work)
/*****************************************************************************
* WorkSchedule
*****************************************************************************/
LL::WorkSchedule::WorkSchedule(const std::string& name, size_t capacity):
super(name),
LL::WorkSchedule::WorkSchedule(const std::string& name, size_t capacity, bool auto_shutdown):
super(name, auto_shutdown),
mQueue(capacity)
{
}
Expand Down
6 changes: 3 additions & 3 deletions indra/llcommon/workqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace LL
* You may omit the WorkQueueBase name, in which case a unique name is
* synthesized; for practical purposes that makes it anonymous.
*/
WorkQueueBase(const std::string& name);
WorkQueueBase(const std::string& name, bool auto_shutdown);

/**
* Since the point of WorkQueue is to pass work to some other worker
Expand Down Expand Up @@ -228,7 +228,7 @@ namespace LL
* You may omit the WorkQueue name, in which case a unique name is
* synthesized; for practical purposes that makes it anonymous.
*/
WorkQueue(const std::string& name = std::string(), size_t capacity=1024);
WorkQueue(const std::string& name = std::string(), size_t capacity=1024, bool auto_shutdown = true);

/**
* Since the point of WorkQueue is to pass work to some other worker
Expand Down Expand Up @@ -298,7 +298,7 @@ namespace LL
* You may omit the WorkSchedule name, in which case a unique name is
* synthesized; for practical purposes that makes it anonymous.
*/
WorkSchedule(const std::string& name = std::string(), size_t capacity=1024);
WorkSchedule(const std::string& name = std::string(), size_t capacity=1024, bool auto_shutdown = true);

/**
* Since the point of WorkSchedule is to pass work to some other worker
Expand Down
Loading
Loading