📄 dsk_keytype.cxx
字号:
/* * Copyright (C) 1998, 1999, 2001, Jonathan S. Shapiro. * * This file is part of the EROS Operating System. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2, * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */#include <eros/target.h>#include <disk/KeyStruct.hxx>boolKeyBits::IsNodeKeyType() const{ switch (GetType()) {#ifdef KT_Wrapper case KT_Wrapper:#endif case KT_Node: case KT_Segment: case KT_Process: case KT_Start: case KT_Resume: return true; default: return false; }}voidKeyBits::KS_SetNumberKey(uint32_t hi, uint32_t mid, uint32_t lo){#ifdef __KERNEL__ IKS_Unchain();#endif InitType(KT_Number); SetUnprepared(); SetReadOnly(); nk.value[0] = lo; nk.value[1] = mid; nk.value[2] = hi;}voidKeyBits::KS_VoidKey(){#ifdef __KERNEL__ IKS_Unchain();#endif InitType(KT_Void); nk.value[0] = 0; nk.value[1] = 0; nk.value[2] = 0;}voidKeyBits::KS_Set(KeyBits& kb){ /* Skip copy if src == dest (surprisingly often!) */ if (&kb == (KeyBits*) this) return; #ifdef __KERNEL__ IKS_Unchain();#endif keyType = kb.keyType; keyFlags = kb.keyFlags & ~KFL_HAZARD_BITS; keyData = kb.keyData; nk.value[0] = kb.nk.value[0]; nk.value[1] = kb.nk.value[1]; nk.value[2] = kb.nk.value[2]; /* Update the linkages if destination is now prepared: */ if ( IsPreparedObjectKey() ) { ok.prev->next = (KeyRing*) this; ok.next = (KeyRing*) &kb; kb.ok.prev = (KeyRing*) this; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -