From 0ec2fa3e765a05fa14a7f6cbd092b11aac811d7b Mon Sep 17 00:00:00 2001 From: Drew Galbraith Date: Wed, 21 Jun 2023 20:47:40 -0700 Subject: [PATCH] [glacier] Move Pair to glacier. --- {zion/lib => lib/glacier/container}/pair.h | 4 ++++ zion/object/channel.cpp | 2 +- zion/object/channel.h | 5 +++-- 3 files changed, 8 insertions(+), 3 deletions(-) rename {zion/lib => lib/glacier/container}/pair.h (86%) diff --git a/zion/lib/pair.h b/lib/glacier/container/pair.h similarity index 86% rename from zion/lib/pair.h rename to lib/glacier/container/pair.h index 71dae30..e633fef 100644 --- a/zion/lib/pair.h +++ b/lib/glacier/container/pair.h @@ -1,5 +1,7 @@ #pragma once +namespace glcr { + template class Pair { public: @@ -11,3 +13,5 @@ class Pair { T first_; U second_; }; + +} // namespace glcr diff --git a/zion/object/channel.cpp b/zion/object/channel.cpp index d8d9a01..4dd4b87 100644 --- a/zion/object/channel.cpp +++ b/zion/object/channel.cpp @@ -3,7 +3,7 @@ #include "include/ztypes.h" #include "scheduler/scheduler.h" -Pair, glcr::RefPtr> +glcr::Pair, glcr::RefPtr> Channel::CreateChannelPair() { auto c1 = glcr::MakeRefCounted(); auto c2 = glcr::MakeRefCounted(); diff --git a/zion/object/channel.h b/zion/object/channel.h index b9fc105..8124221 100644 --- a/zion/object/channel.h +++ b/zion/object/channel.h @@ -1,13 +1,13 @@ #pragma once #include +#include #include #include "capability/capability.h" #include "include/ztypes.h" #include "lib/message_queue.h" #include "lib/mutex.h" -#include "lib/pair.h" #include "object/kernel_object.h" #include "usr/zcall_internal.h" @@ -21,7 +21,8 @@ struct KernelObjectTag { class Channel : public KernelObject { public: uint64_t TypeTag() override { return KernelObject::CHANNEL; } - static Pair, glcr::RefPtr> CreateChannelPair(); + static glcr::Pair, glcr::RefPtr> + CreateChannelPair(); glcr::RefPtr peer() { return peer_; }