From 21addbe9c2a744e5ce2bdd20d811ee2cfe83c8aa Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 16 Jan 2023 00:08:34 +0100 Subject: [PATCH] useless cleanups --- doc/doxygen/uhood.doc | 42 --------------------------------------- include/simgrid/simix.hpp | 3 +-- src/simix/libsmx.cpp | 25 ----------------------- 3 files changed, 1 insertion(+), 69 deletions(-) diff --git a/doc/doxygen/uhood.doc b/doc/doxygen/uhood.doc index 47a4834d29..1d2d163398 100644 --- a/doc/doxygen/uhood.doc +++ b/doc/doxygen/uhood.doc @@ -86,48 +86,6 @@ using ActorPtr = Actor::Ptr; It uses the `simgrid::simix::Process` as an opaque pimple: -~~~ -class Process { -private: - std::atomic_int_fast32_t refcount_ { 1 }; - // The lifetime of the s4u::Actor is bound to the lifetime of the Process: - simgrid::s4u::Actor actor_; -public: - Process() : actor_(this) {} - - // Reference count: - friend void intrusive_ptr_add_ref(Process* process) - { - // Atomic operation! Do not split in two instructions! - auto previous = (process->refcount_)++; - xbt_assert(previous != 0); - (void) previous; - } - friend void intrusive_ptr_release(Process* process) - { - // Atomic operation! Do not split in two instructions! - auto count = --(process->refcount_); - if (count == 0) - delete process; - } - - // [...] -}; - -smx_process_t SIMIX_process_ref(smx_process_t process) -{ - if (process != nullptr) - intrusive_ptr_add_ref(process); - return process; -} - -/** Decrease the refcount for this process */ -void SIMIX_process_unref(smx_process_t process) -{ - if (process != nullptr) - intrusive_ptr_release(process); -} -~~~ @section simgrid_uhood_mc Model Checker diff --git a/include/simgrid/simix.hpp b/include/simgrid/simix.hpp index ac09f91c52..399d63fd22 100644 --- a/include/simgrid/simix.hpp +++ b/include/simgrid/simix.hpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2007-2023. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ diff --git a/src/simix/libsmx.cpp b/src/simix/libsmx.cpp index 3c8536ab9d..8840045f10 100644 --- a/src/simix/libsmx.cpp +++ b/src/simix/libsmx.cpp @@ -23,9 +23,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_simcall, kernel, "transmuting from user request into kernel handlers"); -/** - * @ingroup simix_comm_management - */ void simcall_comm_send(simgrid::kernel::actor::ActorImpl* sender, simgrid::kernel::activity::MailboxImpl* mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*), @@ -37,9 +34,6 @@ void simcall_comm_send(simgrid::kernel::actor::ActorImpl* sender, simgrid::kerne copy_data_fun, data, timeout); } -/** - * @ingroup simix_comm_management - */ simgrid::kernel::activity::ActivityImplPtr simcall_comm_isend(simgrid::kernel::actor::ActorImpl* sender, simgrid::kernel::activity::MailboxImpl* mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, @@ -60,9 +54,6 @@ simcall_comm_isend(simgrid::kernel::actor::ActorImpl* sender, simgrid::kernel::a [&observer] { return simgrid::kernel::activity::CommImpl::isend(&observer); }); } -/** - * @ingroup simix_comm_management - */ void simcall_comm_recv(simgrid::kernel::actor::ActorImpl* receiver, simgrid::kernel::activity::MailboxImpl* mbox, void* dst_buff, size_t* dst_buff_size, bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*), @@ -74,9 +65,6 @@ void simcall_comm_recv(simgrid::kernel::actor::ActorImpl* receiver, simgrid::ker timeout, rate); } -/** - * @ingroup simix_comm_management - */ simgrid::kernel::activity::ActivityImplPtr simcall_comm_irecv(simgrid::kernel::actor::ActorImpl* receiver, simgrid::kernel::activity::MailboxImpl* mbox, void* dst_buff, size_t* dst_buff_size, @@ -92,9 +80,6 @@ simcall_comm_irecv(simgrid::kernel::actor::ActorImpl* receiver, simgrid::kernel: [&observer] { return simgrid::kernel::activity::CommImpl::irecv(&observer); }); } -/** - * @ingroup simix_comm_management - */ ssize_t simcall_comm_waitany(simgrid::kernel::activity::CommImpl* comms[], size_t count, double timeout) // XBT_ATTRIB_DEPRECATED_v335 { @@ -114,9 +99,6 @@ ssize_t simcall_comm_waitany(simgrid::kernel::activity::CommImpl* comms[], size_ return changed_pos; } -/** - * @ingroup simix_comm_management - */ ssize_t simcall_comm_testany(simgrid::kernel::activity::CommImpl* comms[], size_t count) // XBT_ATTRIB_DEPRECATED_v335 { if (count == 0) @@ -137,9 +119,6 @@ ssize_t simcall_comm_testany(simgrid::kernel::activity::CommImpl* comms[], size_ return changed_pos; } -/** - * @ingroup simix_comm_management - */ void simcall_comm_wait(simgrid::kernel::activity::ActivityImpl* comm, double timeout) // XBT_ATTRIB_DEPRECATED_v335 { xbt_assert(std::isfinite(timeout), "timeout is not finite!"); @@ -147,10 +126,6 @@ void simcall_comm_wait(simgrid::kernel::activity::ActivityImpl* comm, double tim simgrid::kernel::actor::simcall_blocking([issuer, comm, timeout] { comm->wait_for(issuer, timeout); }); } -/** - * @ingroup simix_comm_management - * - */ bool simcall_comm_test(simgrid::kernel::activity::ActivityImpl* comm) // XBT_ATTRIB_DEPRECATED_v335 { simgrid::kernel::actor::ActorImpl* issuer = simgrid::kernel::actor::ActorImpl::self(); -- 2.20.1