1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef threading_ThreadId_h
8 #define threading_ThreadId_h
14 void* platformData_
[2];
19 ThreadId(const ThreadId
&) = default;
20 ThreadId(ThreadId
&&) = default;
21 ThreadId
& operator=(const ThreadId
&) = default;
22 ThreadId
& operator=(ThreadId
&&) = default;
24 bool operator==(const ThreadId
& aOther
) const;
25 bool operator!=(const ThreadId
& aOther
) const { return !operator==(aOther
); }
27 MOZ_IMPLICIT
operator bool() const;
29 inline PlatformData
* platformData();
30 inline const PlatformData
* platformData() const;
32 // Return the thread id of the calling thread.
33 static ThreadId
ThisThreadId();
38 #endif // threading_ThreadId_h