paul@483 | 1 | /* |
paul@483 | 2 | * Support for executing code in new tasks and threads. |
paul@483 | 3 | * |
paul@483 | 4 | * Copyright (C) 2022, 2023 Paul Boddie <paul@boddie.org.uk> |
paul@483 | 5 | * |
paul@483 | 6 | * This program is free software; you can redistribute it and/or |
paul@483 | 7 | * modify it under the terms of the GNU General Public License as |
paul@483 | 8 | * published by the Free Software Foundation; either version 2 of |
paul@483 | 9 | * the License, or (at your option) any later version. |
paul@483 | 10 | * |
paul@483 | 11 | * This program is distributed in the hope that it will be useful, |
paul@483 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
paul@483 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
paul@483 | 14 | * GNU General Public License for more details. |
paul@483 | 15 | * |
paul@483 | 16 | * You should have received a copy of the GNU General Public License |
paul@483 | 17 | * along with this program; if not, write to the Free Software |
paul@483 | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, |
paul@483 | 19 | * Boston, MA 02110-1301, USA |
paul@483 | 20 | */ |
paul@483 | 21 | |
paul@483 | 22 | #pragma once |
paul@483 | 23 | |
paul@483 | 24 | #include <exec/process_creating.h> |
paul@483 | 25 | #include <fsserver/resource.h> |
paul@483 | 26 | |
paul@483 | 27 | #include "process_creator_interface.h" |
paul@483 | 28 | |
paul@483 | 29 | |
paul@483 | 30 | |
paul@483 | 31 | /* Process creator. */ |
paul@483 | 32 | |
paul@483 | 33 | class ProcessCreatorResource : public Resource, public ProcessCreating, |
paul@483 | 34 | public ProcessCreator |
paul@483 | 35 | { |
paul@483 | 36 | public: |
paul@483 | 37 | explicit ProcessCreatorResource(const char *rm_filename); |
paul@483 | 38 | |
paul@483 | 39 | virtual ~ProcessCreatorResource(); |
paul@483 | 40 | |
paul@483 | 41 | /* Server details. */ |
paul@483 | 42 | |
paul@483 | 43 | ipc_server_default_config_type config(); |
paul@483 | 44 | |
paul@483 | 45 | void *interface() |
paul@483 | 46 | { return static_cast<ProcessCreator *>(this); } |
paul@483 | 47 | |
paul@483 | 48 | /* Process creator interface methods. */ |
paul@483 | 49 | |
paul@483 | 50 | virtual long start(l4_cap_idx_t program, l4_cap_idx_t notifier); |
paul@483 | 51 | }; |
paul@483 | 52 | |
paul@483 | 53 | /* vim: tabstop=2 expandtab shiftwidth=2 |
paul@483 | 54 | */ |