diff --git a/repos/ports-foc/src/server/balloon/main.cc b/repos/ports-foc/src/server/balloon/main.cc deleted file mode 100644 index 877fadc68..000000000 --- a/repos/ports-foc/src/server/balloon/main.cc +++ /dev/null @@ -1,90 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -using namespace Genode; - -class Session_component; -static List session_list; - - -class Session_component : public Rpc_object, - public List::Element -{ - private: - - Signal_context_capability _handler; - - public: - - Session_component() { - session_list.insert(this); } - - ~Session_component() { - session_list.remove(this); }; - - int increase_quota(Ram_session_capability ram_session, size_t amount) - { - PDBG("increase ram_quota of client by %zx", amount); - while (true) ; - return 0; - } - - void balloon_handler(Signal_context_capability handler) { - _handler = handler; } - - Signal_context_capability handler() { return _handler; } -}; - - -class Root : public Genode::Root_component -{ - protected: - - Session_component *_create_session(const char *args) - { - size_t ram_quota = - Arg_string::find_arg(args, "ram_quota").ulong_value(0); - - if (ram_quota < sizeof(Session_component)) - throw Root::Quota_exceeded(); - - return new (md_alloc()) Session_component(); - } - - public: - - Root(Rpc_entrypoint *session_ep, - Allocator *md_alloc) - : Root_component(session_ep, md_alloc) { } -}; - - -int main() { - - enum { STACK_SIZE = 1024*sizeof(Genode::addr_t) }; - - static Timer::Connection timer; - static Cap_connection cap; - static Rpc_entrypoint ep(&cap, STACK_SIZE, "balloon_ep"); - static ::Root root(&ep, env()->heap()); - env()->parent()->announce(ep.manage(&root)); - - while (true) { - Session_component *c = session_list.first(); - while (c) { - if (c->handler().valid()) { - PINF("request memory from client!"); - Signal_transmitter transmitter(c->handler()); - transmitter.submit(); - } - c = c->next(); - } - timer.msleep(10000); - } - return 0; -} diff --git a/repos/ports-foc/src/server/balloon/target.mk b/repos/ports-foc/src/server/balloon/target.mk deleted file mode 100644 index 56950d201..000000000 --- a/repos/ports-foc/src/server/balloon/target.mk +++ /dev/null @@ -1,3 +0,0 @@ -TARGET = balloon -LIBS = base -SRC_CC = main.cc