libdom_setup_keeper.c

来自「C++ 编写的EROS RTOS」· C语言 代码 · 共 65 行

C
65
字号
/* * Copyright (C) 2001 Jonathan S. Shapiro. * * This file is part of the EROS Operating System runtime library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, 59 Temple Place - Suite 330 Boston, MA 02111-1307, USA. */#include <eros/target.h>#include <eros/ProcessKey.h>#include <eros/ProcessState.h>#include <eros/NodeKey.h>#include <eros/PageKey.h>#include <eros/Key.h>#include <eros/Invoke.h>#include <domain/Runtime.h>#include <domain/ProtoSpace.h>#include <domain/SpaceBankKey.h>#include <domain/ProcessCreatorKey.h>#include <domain/ConstructorKey.h>void __rt_setup_keeper() __attribute__((weak, alias("__rt_do_setup_keeper")));#define KR_KEEPER KR_APP(0)void__rt_do_setup_keeper(){  extern uint32_t __rt_unkept;  uint32_t result;  uint32_t keyType;  if (__rt_unkept)    return;  process_copy(KR_SELF, ProcKeeper, KR_KEEPER);  result = key_kt(KR_KEEPER, &keyType, 0);  if (result == RC_Void)    keyType = AKT_Void;  if (keyType == AKT_ConstructorRequestor) {    result = constructor_request(KR_KEEPER, KR_BANK, KR_SCHED,				 KR_VOID, KR_KEEPER);    process_swap(KR_SELF, ProcKeeper, KR_KEEPER, KR_VOID);    return;  }  if (keyType == AKT_Void) {  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?