Skip to content

Commit 35c9d09

Browse files
authored
Merge pull request #3239 from secondlife/marchcat/c-develop
develop → Maint C sync
2 parents a14d9fe + e8c59d9 commit 35c9d09

File tree

197 files changed

+4854
-1844
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+4854
-1844
lines changed

autobuild.xml

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2465,23 +2465,17 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
24652465
</map>
24662466
<key>threejs</key>
24672467
<map>
2468+
<key>copyright</key>
2469+
<string>Copyright © 2010-2021 three.js authors</string>
2470+
<key>license</key>
2471+
<string>MIT</string>
2472+
<key>license_file</key>
2473+
<string>LICENSES/THREEJS_LICENSE.txt</string>
2474+
<key>name</key>
2475+
<string>threejs</string>
24682476
<key>platforms</key>
24692477
<map>
2470-
<key>darwin64</key>
2471-
<map>
2472-
<key>archive</key>
2473-
<map>
2474-
<key>hash</key>
2475-
<string>cfed00d8ea7265c035c2d86a234b28efb0b23756</string>
2476-
<key>hash_algorithm</key>
2477-
<string>sha1</string>
2478-
<key>url</key>
2479-
<string>https://github.com/secondlife/3p-three_js/releases/download/v0.132.2-b8f6746/threejs-0.132.2-darwin64-b8f6746.tar.zst</string>
2480-
</map>
2481-
<key>name</key>
2482-
<string>darwin64</string>
2483-
</map>
2484-
<key>linux64</key>
2478+
<key>common</key>
24852479
<map>
24862480
<key>archive</key>
24872481
<map>
@@ -2493,33 +2487,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
24932487
<string>https://github.com/secondlife/3p-three_js/releases/download/v0.132.2-5da28d9/threejs-0.132.2-common-8454371083.tar.zst</string>
24942488
</map>
24952489
<key>name</key>
2496-
<string>linux64</string>
2497-
</map>
2498-
<key>windows64</key>
2499-
<map>
2500-
<key>archive</key>
2501-
<map>
2502-
<key>hash</key>
2503-
<string>4141710fccbd1ea2b3b53d00e189bdfa2ee9d441</string>
2504-
<key>hash_algorithm</key>
2505-
<string>sha1</string>
2506-
<key>url</key>
2507-
<string>https://github.com/secondlife/3p-three_js/releases/download/v0.132.2-b8f6746/threejs-0.132.2-windows64-b8f6746.tar.zst</string>
2508-
</map>
2509-
<key>name</key>
2510-
<string>windows64</string>
2490+
<string>common</string>
25112491
</map>
25122492
</map>
2513-
<key>license</key>
2514-
<string>MIT</string>
2515-
<key>license_file</key>
2516-
<string>LICENSES/THREEJS_LICENSE.txt</string>
2517-
<key>copyright</key>
2518-
<string>Copyright © 2010-2021 three.js authors</string>
25192493
<key>version</key>
25202494
<string>0.132.2</string>
2521-
<key>name</key>
2522-
<string>threejs</string>
25232495
</map>
25242496
<key>tinygltf</key>
25252497
<map>

indra/llcharacter/llcharacter.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ class LLCharacter
119119

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

122+
virtual std::string getDebugName() const { return getID().asString(); }
123+
122124
virtual const LLUUID& getID() const = 0;
123125
//-------------------------------------------------------------------------
124126
// End Interface

indra/llcommon/lldate.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@ std::string LLDate::asRFC1123() const
7979
return toHTTPDateString (std::string ("%A, %d %b %Y %H:%M:%S GMT"));
8080
}
8181

82+
std::string LLDate::toLocalDateString (std::string fmt) const
83+
{
84+
LL_PROFILE_ZONE_SCOPED;
85+
86+
time_t locSeconds = (time_t) mSecondsSinceEpoch;
87+
struct tm * lt = localtime (&locSeconds);
88+
return toHTTPDateString(lt, fmt);
89+
}
90+
8291
std::string LLDate::toHTTPDateString (std::string fmt) const
8392
{
8493
LL_PROFILE_ZONE_SCOPED;

indra/llcommon/lldate.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ class LL_COMMON_API LLDate
7979
std::string asRFC1123() const;
8080
void toStream(std::ostream&) const;
8181
bool split(S32 *year, S32 *month = NULL, S32 *day = NULL, S32 *hour = NULL, S32 *min = NULL, S32 *sec = NULL) const;
82+
std::string toLocalDateString (std::string fmt) const;
8283
std::string toHTTPDateString (std::string fmt) const;
8384
static std::string toHTTPDateString (tm * gmt, std::string fmt);
8485
/**

indra/llcommon/llprocessor.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,14 @@ class LLProcessorInfoDarwinImpl : public LLProcessorInfoImpl
638638
{
639639
getCPUIDInfo();
640640
uint64_t frequency = getSysctlInt64("hw.cpufrequency");
641+
if (!frequency)
642+
{
643+
auto tbfrequency = getSysctlInt64("hw.tbfrequency");
644+
struct clockinfo clockrate;
645+
auto clockrate_len = sizeof(clockrate);
646+
if (!sysctlbyname("kern.clockrate", &clockrate, &clockrate_len, NULL, 0))
647+
frequency = tbfrequency * clockrate.hz;
648+
}
641649
setInfo(eFrequency, (F64)frequency / (F64)1000000);
642650
}
643651

indra/llcommon/threadpool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ namespace LL
124124
size_t threads=1,
125125
size_t capacity=1024*1024,
126126
bool auto_shutdown = true):
127-
ThreadPoolBase(name, threads, new queue_t(name, capacity), auto_shutdown)
127+
ThreadPoolBase(name, threads, new queue_t(name, capacity, false), auto_shutdown)
128128
{}
129129
~ThreadPoolUsing() override {}
130130

indra/llcommon/workqueue.cpp

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@ using Lock = LLCoros::LockType;
2929
/*****************************************************************************
3030
* WorkQueueBase
3131
*****************************************************************************/
32-
LL::WorkQueueBase::WorkQueueBase(const std::string& name):
33-
super(makeName(name))
32+
LL::WorkQueueBase::WorkQueueBase(const std::string& name, bool auto_shutdown)
33+
: super(makeName(name))
3434
{
35-
// Register for status change events so we'll implicitly close() on viewer
36-
// shutdown.
37-
mStopListener = LLCoros::getStopListener(
38-
"WorkQueue:" + getKey(),
39-
[this](const LLSD&){ close(); });
35+
if (auto_shutdown)
36+
{
37+
// Register for status change events so we'll implicitly close() on viewer
38+
// shutdown.
39+
mStopListener = LLCoros::getStopListener(
40+
"WorkQueue:" + getKey(),
41+
[this](const LLSD&) { close(); });
42+
}
4043
}
4144

4245
void LL::WorkQueueBase::runUntilClose()
@@ -136,8 +139,8 @@ void LL::WorkQueueBase::checkCoroutine(const std::string& method)
136139
/*****************************************************************************
137140
* WorkQueue
138141
*****************************************************************************/
139-
LL::WorkQueue::WorkQueue(const std::string& name, size_t capacity):
140-
super(name),
142+
LL::WorkQueue::WorkQueue(const std::string& name, size_t capacity, bool auto_shutdown):
143+
super(name, auto_shutdown),
141144
mQueue(capacity)
142145
{
143146
}
@@ -185,8 +188,8 @@ bool LL::WorkQueue::tryPop_(Work& work)
185188
/*****************************************************************************
186189
* WorkSchedule
187190
*****************************************************************************/
188-
LL::WorkSchedule::WorkSchedule(const std::string& name, size_t capacity):
189-
super(name),
191+
LL::WorkSchedule::WorkSchedule(const std::string& name, size_t capacity, bool auto_shutdown):
192+
super(name, auto_shutdown),
190193
mQueue(capacity)
191194
{
192195
}

indra/llcommon/workqueue.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ namespace LL
5252
* You may omit the WorkQueueBase name, in which case a unique name is
5353
* synthesized; for practical purposes that makes it anonymous.
5454
*/
55-
WorkQueueBase(const std::string& name);
55+
WorkQueueBase(const std::string& name, bool auto_shutdown);
5656

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

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

303303
/**
304304
* Since the point of WorkSchedule is to pass work to some other worker

0 commit comments

Comments
 (0)