MCPcopy Create free account
hub / github.com/ReadyTalk/avian / Local

Class Local

src/system/windows.cpp:489–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487 };
488
489 class Local : public System::Local {
490 public:
491 Local(System* s) : s(s)
492 {
493 key = TlsAlloc();
494 assertT(s, key != TLS_OUT_OF_INDEXES);
495 }
496
497 virtual void* get()
498 {
499 return TlsGetValue(key);
500 }
501
502 virtual void set(void* p)
503 {
504 bool r UNUSED = TlsSetValue(key, p);
505 assertT(s, r);
506 }
507
508 virtual void dispose()
509 {
510 bool r UNUSED = TlsFree(key);
511 assertT(s, r);
512
513 ::free(this);
514 }
515
516 System* s;
517 unsigned key;
518 };
519
520 class Region : public System::Region {
521 public:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected