1f25ce65dSSergey Makeev // The MIT License (MIT) 2f25ce65dSSergey Makeev // 3f25ce65dSSergey Makeev // Copyright (c) 2015 Sergey Makeev, Vadim Slyusarev 4f25ce65dSSergey Makeev // 5f25ce65dSSergey Makeev // Permission is hereby granted, free of charge, to any person obtaining a copy 6f25ce65dSSergey Makeev // of this software and associated documentation files (the "Software"), to deal 7f25ce65dSSergey Makeev // in the Software without restriction, including without limitation the rights 8f25ce65dSSergey Makeev // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9f25ce65dSSergey Makeev // copies of the Software, and to permit persons to whom the Software is 10f25ce65dSSergey Makeev // furnished to do so, subject to the following conditions: 11f25ce65dSSergey Makeev // 12f25ce65dSSergey Makeev // The above copyright notice and this permission notice shall be included in 13f25ce65dSSergey Makeev // all copies or substantial portions of the Software. 14f25ce65dSSergey Makeev // 15f25ce65dSSergey Makeev // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16f25ce65dSSergey Makeev // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17f25ce65dSSergey Makeev // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18f25ce65dSSergey Makeev // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19f25ce65dSSergey Makeev // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20f25ce65dSSergey Makeev // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21f25ce65dSSergey Makeev // THE SOFTWARE. 2247d53e4dSSergey Makeev 23f25ce65dSSergey Makeev #pragma once 2447d53e4dSSergey Makeev 2581ec7369SSergey Makeev #ifndef __MT_FIBER__ 2681ec7369SSergey Makeev #define __MT_FIBER__ 2781ec7369SSergey Makeev 281e78cb24Ss.makeev_local #include <MTConfig.h> 2981ec7369SSergey Makeev 30*3d930776Ss.makeev_local 31*3d930776Ss.makeev_local #if MT_PTR64 32*3d930776Ss.makeev_local 33*3d930776Ss.makeev_local #define ReadTeb(offset) __readgsqword(offset); 34*3d930776Ss.makeev_local #define WriteTeb(offset, v) __writegsqword(offset, v) 35*3d930776Ss.makeev_local 36*3d930776Ss.makeev_local #else 37*3d930776Ss.makeev_local 38*3d930776Ss.makeev_local #define ReadTeb(offset) __readfsdword(offset); 39*3d930776Ss.makeev_local #define WriteTeb(offset, v) __writefsdword(offset, v) 40*3d930776Ss.makeev_local 41*3d930776Ss.makeev_local #endif 42*3d930776Ss.makeev_local 43*3d930776Ss.makeev_local 446bbc0262SSergey Makeev #include "MTFiberOptimized.h" 45512a29eaSSergey Makeev 46512a29eaSSergey Makeev 4781ec7369SSergey Makeev #endif 48