Commit Graph

28 Commits

Author SHA1 Message Date
rdb 76677e5c00 pstats: Deprecate `PStatClient::resume_after_pause()`
It creates a clock skew in the PStats timing information that cannot be corrected for in the server.  If we want to bring this back, we should either have a global `pause()` and `resume()` (so we can properly pause collection in the meantime, and have a time to reset to, but we'd need to think about how to handle threading) or we should add a `drop_frame()` to drop the current frame.  If we must bring it back in its current form, then we need to communicate the clock reset to the server, so that it can properly take it into account.
2022-12-02 22:19:43 +01:00
rdb 77b0d2d6a7 pstats: Switch from AtomicAdjust to C++11-style atomics 2022-02-07 17:02:30 +01:00
Sam Edwards 7790f8429d general: Fully qualify header references into the std namespace
Closes #341
2018-06-07 10:35:12 +02:00
Sam Edwards e2b4353800 general: Replace NULL (and 0 as pointer) with C++11 nullptr
Exceptions to this replacement are:
- .c files
- Headers included by a .c file
- stb_image.h
- dr_flac.h
- Strings
- Comments
2018-06-03 16:35:13 -06:00
rdb 0bb81a43c9 express: make a thread safe weak pointer implementation (#321)
To access a WeakPointerTo in a thread-safe way, use something like this:

    if (auto ptr = weak_ptr.lock()) {
      ..use ptr as regular PointerTo
    }

The new implementation no longer needs a reference to be stored to all weak pointers on the WeakReferenceList; a mere count of weak pointers is sufficient.  Therefore, callbacks theoretically no longer require a WeakPointerTo to be constructed.

The WeakPointerTo class is not actually atomic; it could be made so, but I don't believe it's worth it at this time.
2018-05-15 13:40:21 +02:00
rdb 9963fe2c3c Fix a couple of compile warnings, reduce unnecessary includes 2016-06-23 22:59:50 +02:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb 18ad6d1543 Replace many int params with size_t params where appropriate, and work towards fixing type conversion warnings 2015-10-07 18:58:26 +02:00
David Rose cb9b0f075d PStats should use doubles consistently 2011-10-27 18:39:27 +00:00
David Rose 501470169f stdfloat_double 2011-10-10 05:25:10 +00:00
David Rose 574403a39f fix pstats mutex leaking 2009-01-22 00:17:07 +00:00
David Rose d4c2c9858d SIMPLE_THREADS_NO_MUTEX -> LightMutex 2008-10-08 23:23:40 +00:00
David Rose fb9c56432a we are now using the modified BSD license 2008-05-28 18:37:20 +00:00
David Rose 0c2b6e3164 threaded pstats fix 2007-11-27 01:15:26 +00:00
David Rose ddd1046462 factor out Thread::get_current_thread() some more 2006-04-26 07:31:23 +00:00
David Rose 9e986fce40 make PStats more thread-friendly 2006-04-09 20:17:26 +00:00
David Rose b7ceab1bff integrate PStatThread and Thread; better thread handling in GraphicsEngine::render_frame() 2006-01-31 18:59:49 +00:00
David Rose 8567173ece more threading issues 2006-01-16 15:42:28 +00:00
David Rose 84bcfefc13 defer creation of PStatCollectorDef 2004-12-23 19:54:46 +00:00
David Rose db8cdc119d split out PStatClientImpl 2004-12-23 19:10:35 +00:00
David Rose 843c0331ae update license, change remaining local #includes to use quotation marks 2004-02-13 19:27:33 +00:00
David Rose 543b7283b9 stop pstats when stopped at prompt 2001-06-15 22:18:51 +00:00
David Rose 2f4e207edb Update copyright header 2001-05-25 21:27:38 +00:00
David Rose d7ed6d3cbd Improved pstats support for texmem 2001-05-22 03:33:32 +00:00
David Rose e50b9eb36c Revamping PStats to support texture memory, etc. 2001-05-18 15:53:05 +00:00
David Rose d35893417b *** empty log message *** 2001-05-17 00:16:42 +00:00
David Rose 28d9163810 *** empty log message *** 2001-05-17 00:07:23 +00:00
David Rose 2fd714e52f Initial revision 2000-10-04 01:14:41 +00:00