Remove unused Cleanup() call
It was used to clean up shared memory. We don't construct that anymore,
so remove the useless call.
Change-Id: I8087cef2afce184f66721a9995a63053fb278ec7
diff --git a/aos/BUILD b/aos/BUILD
index da103d4..2bb1d50 100644
--- a/aos/BUILD
+++ b/aos/BUILD
@@ -260,7 +260,6 @@
deps = [
":realtime",
"//aos:die",
- "//aos/ipc_lib:shared_mem",
"//aos/logging:implementations",
],
)
diff --git a/aos/aos_dump.cc b/aos/aos_dump.cc
index fe6cbd5..62fb5cb 100644
--- a/aos/aos_dump.cc
+++ b/aos/aos_dump.cc
@@ -115,6 +115,6 @@
}
event_loop.Run();
- ::aos::Cleanup();
+
return 0;
}
diff --git a/aos/events/logging/log_cat.cc b/aos/events/logging/log_cat.cc
index d3095cb..f4ef578 100644
--- a/aos/events/logging/log_cat.cc
+++ b/aos/events/logging/log_cat.cc
@@ -225,6 +225,5 @@
event_loop_factory.Run();
- aos::Cleanup();
return 0;
}
diff --git a/aos/events/logging/log_edit.cc b/aos/events/logging/log_edit.cc
index 0dca904..4078f9b 100644
--- a/aos/events/logging/log_edit.cc
+++ b/aos/events/logging/log_edit.cc
@@ -57,6 +57,5 @@
}
}
- aos::Cleanup();
return 0;
}
diff --git a/aos/events/logging/log_stats.cc b/aos/events/logging/log_stats.cc
index 8243d9f..eac8d08 100644
--- a/aos/events/logging/log_stats.cc
+++ b/aos/events/logging/log_stats.cc
@@ -183,6 +183,6 @@
// Cleanup the created processes
reader.Deregister();
- aos::Cleanup();
+
return 0;
}
diff --git a/aos/events/logging/logger_main.cc b/aos/events/logging/logger_main.cc
index 577556e..2575e85 100644
--- a/aos/events/logging/logger_main.cc
+++ b/aos/events/logging/logger_main.cc
@@ -41,6 +41,5 @@
event_loop.Run();
- aos::Cleanup();
return 0;
}
diff --git a/aos/events/ping.cc b/aos/events/ping.cc
index f829b41..a759a8f 100644
--- a/aos/events/ping.cc
+++ b/aos/events/ping.cc
@@ -20,6 +20,5 @@
event_loop.Run();
- aos::Cleanup();
return 0;
}
diff --git a/aos/events/pong.cc b/aos/events/pong.cc
index 581d04f..f9f35c2 100644
--- a/aos/events/pong.cc
+++ b/aos/events/pong.cc
@@ -22,6 +22,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/aos/init.cc b/aos/init.cc
index c40f22c..163f5dd 100644
--- a/aos/init.cc
+++ b/aos/init.cc
@@ -14,7 +14,6 @@
#include <malloc.h>
#include "aos/die.h"
-#include "aos/ipc_lib/shared_mem.h"
#include "aos/logging/implementations.h"
#include "aos/realtime.h"
@@ -98,10 +97,6 @@
AOS_LOG(INFO, "%s initialized realtime\n", program_invocation_short_name);
}
-void Cleanup() {
- aos_core_free_shared_mem();
-}
-
void PinCurrentThreadToCPU(int number) {
cpu_set_t cpuset;
CPU_ZERO(&cpuset);
diff --git a/aos/init.h b/aos/init.h
index 3ff56b8..98bc266 100644
--- a/aos/init.h
+++ b/aos/init.h
@@ -23,9 +23,6 @@
// Same as InitNRT, except will remove an existing shared memory file and create
// a new one.
void InitCreate();
-// Cleans up (probably not going to get called very often because few things can
-// exit gracefully).
-void Cleanup();
// Performs the realtime parts of initialization after InitNRT() has been called.
void GoRT(int relative_priority = 0);
diff --git a/frc971/wpilib/wpilib_robot_base.h b/frc971/wpilib/wpilib_robot_base.h
index ea68306..3404bb8 100644
--- a/frc971/wpilib/wpilib_robot_base.h
+++ b/frc971/wpilib/wpilib_robot_base.h
@@ -29,9 +29,7 @@
thread.join();
}
- AOS_LOG(ERROR, "Exiting WPILibRobot\n");
-
- ::aos::Cleanup();
+ LOG(ERROR) << "Exiting WPILibRobot";
}
protected:
diff --git a/y2012/control_loops/accessories/accessories.cc b/y2012/control_loops/accessories/accessories.cc
index 86105e9..4618b48 100644
--- a/y2012/control_loops/accessories/accessories.cc
+++ b/y2012/control_loops/accessories/accessories.cc
@@ -57,5 +57,5 @@
event_loop.Run();
- ::aos::Cleanup();
+ return 0;
}
diff --git a/y2012/control_loops/drivetrain/drivetrain_main.cc b/y2012/control_loops/drivetrain/drivetrain_main.cc
index ad55b26..3bc9dce 100644
--- a/y2012/control_loops/drivetrain/drivetrain_main.cc
+++ b/y2012/control_loops/drivetrain/drivetrain_main.cc
@@ -21,6 +21,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2012/joystick_reader.cc b/y2012/joystick_reader.cc
index 4683b29..a40d148 100644
--- a/y2012/joystick_reader.cc
+++ b/y2012/joystick_reader.cc
@@ -162,5 +162,5 @@
event_loop.Run();
- ::aos::Cleanup();
+ return 0;
}
diff --git a/y2014/actors/autonomous_actor_main.cc b/y2014/actors/autonomous_actor_main.cc
index 44e10d0..524c8f8 100644
--- a/y2014/actors/autonomous_actor_main.cc
+++ b/y2014/actors/autonomous_actor_main.cc
@@ -15,6 +15,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2014/actors/shoot_actor_main.cc b/y2014/actors/shoot_actor_main.cc
index ef06915..9ae0f9d 100644
--- a/y2014/actors/shoot_actor_main.cc
+++ b/y2014/actors/shoot_actor_main.cc
@@ -15,6 +15,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2014/control_loops/claw/claw_main.cc b/y2014/control_loops/claw/claw_main.cc
index 6e8ff43..94936b5 100644
--- a/y2014/control_loops/claw/claw_main.cc
+++ b/y2014/control_loops/claw/claw_main.cc
@@ -14,6 +14,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2014/control_loops/drivetrain/drivetrain_main.cc b/y2014/control_loops/drivetrain/drivetrain_main.cc
index 651757f..c208738 100644
--- a/y2014/control_loops/drivetrain/drivetrain_main.cc
+++ b/y2014/control_loops/drivetrain/drivetrain_main.cc
@@ -20,6 +20,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2014/control_loops/shooter/shooter_main.cc b/y2014/control_loops/shooter/shooter_main.cc
index 6f3b1f2..88c40d0 100644
--- a/y2014/control_loops/shooter/shooter_main.cc
+++ b/y2014/control_loops/shooter/shooter_main.cc
@@ -14,6 +14,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2014/joystick_reader.cc b/y2014/joystick_reader.cc
index 3f52c46..f903270 100644
--- a/y2014/joystick_reader.cc
+++ b/y2014/joystick_reader.cc
@@ -454,5 +454,5 @@
event_loop.Run();
- ::aos::Cleanup();
+ return 0;
}
diff --git a/y2014_bot3/actors/autonomous_actor_main.cc b/y2014_bot3/actors/autonomous_actor_main.cc
index 9dfc422..c028cf7 100644
--- a/y2014_bot3/actors/autonomous_actor_main.cc
+++ b/y2014_bot3/actors/autonomous_actor_main.cc
@@ -15,6 +15,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2014_bot3/control_loops/drivetrain/drivetrain_main.cc b/y2014_bot3/control_loops/drivetrain/drivetrain_main.cc
index 0eb1bbe..3678aa7 100644
--- a/y2014_bot3/control_loops/drivetrain/drivetrain_main.cc
+++ b/y2014_bot3/control_loops/drivetrain/drivetrain_main.cc
@@ -22,6 +22,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2014_bot3/control_loops/rollers/rollers_main.cc b/y2014_bot3/control_loops/rollers/rollers_main.cc
index 443e18e..53f2e8f 100644
--- a/y2014_bot3/control_loops/rollers/rollers_main.cc
+++ b/y2014_bot3/control_loops/rollers/rollers_main.cc
@@ -14,6 +14,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2014_bot3/joystick_reader.cc b/y2014_bot3/joystick_reader.cc
index 1c06c8c..23b08ea 100644
--- a/y2014_bot3/joystick_reader.cc
+++ b/y2014_bot3/joystick_reader.cc
@@ -148,5 +148,5 @@
event_loop.Run();
- ::aos::Cleanup();
+ return 0;
}
diff --git a/y2014_bot3/output/motor_writer.cc b/y2014_bot3/output/motor_writer.cc
index 440aa7a..5763e49 100644
--- a/y2014_bot3/output/motor_writer.cc
+++ b/y2014_bot3/output/motor_writer.cc
@@ -117,6 +117,8 @@
int main() {
::aos::Init();
::bot3::output::MotorWriter writer;
+
writer.Run();
- ::aos::Cleanup();
+
+ return 0;
}
diff --git a/y2016/actors/autonomous_actor_main.cc b/y2016/actors/autonomous_actor_main.cc
index 79a1250..41b4539 100644
--- a/y2016/actors/autonomous_actor_main.cc
+++ b/y2016/actors/autonomous_actor_main.cc
@@ -14,6 +14,5 @@
::y2016::actors::AutonomousActor autonomous(&event_loop);
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2016/actors/superstructure_actor_main.cc b/y2016/actors/superstructure_actor_main.cc
index fe512d7..54331c9 100644
--- a/y2016/actors/superstructure_actor_main.cc
+++ b/y2016/actors/superstructure_actor_main.cc
@@ -14,6 +14,5 @@
::y2016::actors::SuperstructureActor superstructure(&event_loop);
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2016/actors/vision_align_actor_main.cc b/y2016/actors/vision_align_actor_main.cc
index c7aaf50..b62fc2d 100644
--- a/y2016/actors/vision_align_actor_main.cc
+++ b/y2016/actors/vision_align_actor_main.cc
@@ -14,6 +14,5 @@
::y2016::actors::VisionAlignActor vision_align(&event_loop);
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2016/control_loops/drivetrain/drivetrain_main.cc b/y2016/control_loops/drivetrain/drivetrain_main.cc
index ce65e0c..ad28119 100644
--- a/y2016/control_loops/drivetrain/drivetrain_main.cc
+++ b/y2016/control_loops/drivetrain/drivetrain_main.cc
@@ -21,6 +21,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2016/control_loops/shooter/shooter_main.cc b/y2016/control_loops/shooter/shooter_main.cc
index 3545985..2b045fa 100644
--- a/y2016/control_loops/shooter/shooter_main.cc
+++ b/y2016/control_loops/shooter/shooter_main.cc
@@ -14,6 +14,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2016/control_loops/superstructure/superstructure_main.cc b/y2016/control_loops/superstructure/superstructure_main.cc
index 108a5a8..5f2cbb4 100644
--- a/y2016/control_loops/superstructure/superstructure_main.cc
+++ b/y2016/control_loops/superstructure/superstructure_main.cc
@@ -15,6 +15,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2016/dashboard/dashboard.cc b/y2016/dashboard/dashboard.cc
index 3361e96..74df0a5 100644
--- a/y2016/dashboard/dashboard.cc
+++ b/y2016/dashboard/dashboard.cc
@@ -307,6 +307,5 @@
socket_handler.Quit();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2016/joystick_reader.cc b/y2016/joystick_reader.cc
index fbb91a5..e81942d 100644
--- a/y2016/joystick_reader.cc
+++ b/y2016/joystick_reader.cc
@@ -471,5 +471,5 @@
event_loop.Run();
- ::aos::Cleanup();
+ return 0;
}
diff --git a/y2017/actors/autonomous_actor_main.cc b/y2017/actors/autonomous_actor_main.cc
index d87ac84..116e801 100644
--- a/y2017/actors/autonomous_actor_main.cc
+++ b/y2017/actors/autonomous_actor_main.cc
@@ -14,6 +14,5 @@
::y2017::actors::AutonomousActor autonomous(&event_loop);
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2017/control_loops/drivetrain/drivetrain_main.cc b/y2017/control_loops/drivetrain/drivetrain_main.cc
index f604479..7f9a838 100644
--- a/y2017/control_loops/drivetrain/drivetrain_main.cc
+++ b/y2017/control_loops/drivetrain/drivetrain_main.cc
@@ -21,6 +21,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2017/control_loops/superstructure/superstructure_main.cc b/y2017/control_loops/superstructure/superstructure_main.cc
index 6b43d15..38b750f 100644
--- a/y2017/control_loops/superstructure/superstructure_main.cc
+++ b/y2017/control_loops/superstructure/superstructure_main.cc
@@ -15,6 +15,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2017/joystick_reader.cc b/y2017/joystick_reader.cc
index c7f0666..a0c20d1 100644
--- a/y2017/joystick_reader.cc
+++ b/y2017/joystick_reader.cc
@@ -331,5 +331,5 @@
event_loop.Run();
- ::aos::Cleanup();
+ return 0;
}
diff --git a/y2018/actors/autonomous_actor_main.cc b/y2018/actors/autonomous_actor_main.cc
index 76fae2e..e9d775b 100644
--- a/y2018/actors/autonomous_actor_main.cc
+++ b/y2018/actors/autonomous_actor_main.cc
@@ -14,6 +14,5 @@
::y2018::actors::AutonomousActor autonomous(&event_loop);
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2018/control_loops/drivetrain/drivetrain_main.cc b/y2018/control_loops/drivetrain/drivetrain_main.cc
index c9fea5d..59c8c78 100644
--- a/y2018/control_loops/drivetrain/drivetrain_main.cc
+++ b/y2018/control_loops/drivetrain/drivetrain_main.cc
@@ -21,6 +21,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2018/control_loops/superstructure/superstructure_main.cc b/y2018/control_loops/superstructure/superstructure_main.cc
index f072c68..fb2d1e4 100644
--- a/y2018/control_loops/superstructure/superstructure_main.cc
+++ b/y2018/control_loops/superstructure/superstructure_main.cc
@@ -15,6 +15,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2018/joystick_reader.cc b/y2018/joystick_reader.cc
index c8c5385..91737e3 100644
--- a/y2018/joystick_reader.cc
+++ b/y2018/joystick_reader.cc
@@ -399,5 +399,5 @@
event_loop.Run();
- ::aos::Cleanup();
+ return 0;
}
diff --git a/y2019/actors/autonomous_actor_main.cc b/y2019/actors/autonomous_actor_main.cc
index aa176f9..705db28 100644
--- a/y2019/actors/autonomous_actor_main.cc
+++ b/y2019/actors/autonomous_actor_main.cc
@@ -15,6 +15,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2019/control_loops/drivetrain/drivetrain_main.cc b/y2019/control_loops/drivetrain/drivetrain_main.cc
index cbc65e0..53e2bf5 100644
--- a/y2019/control_loops/drivetrain/drivetrain_main.cc
+++ b/y2019/control_loops/drivetrain/drivetrain_main.cc
@@ -22,6 +22,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2019/control_loops/drivetrain/drivetrain_replay.cc b/y2019/control_loops/drivetrain/drivetrain_replay.cc
index 4f40d75..3689970 100644
--- a/y2019/control_loops/drivetrain/drivetrain_replay.cc
+++ b/y2019/control_loops/drivetrain/drivetrain_replay.cc
@@ -58,6 +58,5 @@
reader.event_loop_factory()->Run();
- aos::Cleanup();
return 0;
}
diff --git a/y2019/control_loops/drivetrain/replay_localizer.cc b/y2019/control_loops/drivetrain/replay_localizer.cc
index 93282c8..de28317 100644
--- a/y2019/control_loops/drivetrain/replay_localizer.cc
+++ b/y2019/control_loops/drivetrain/replay_localizer.cc
@@ -403,5 +403,5 @@
::y2019::control_loops::drivetrain::LocalizerReplayer replay;
replay.ProcessFile(FLAGS_logfile.c_str());
- ::aos::Cleanup();
+ return 0;
}
diff --git a/y2019/control_loops/superstructure/superstructure_main.cc b/y2019/control_loops/superstructure/superstructure_main.cc
index b98c249..7a7eff9 100644
--- a/y2019/control_loops/superstructure/superstructure_main.cc
+++ b/y2019/control_loops/superstructure/superstructure_main.cc
@@ -15,6 +15,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2019/joystick_reader.cc b/y2019/joystick_reader.cc
index 59906c7..5dc75a7 100644
--- a/y2019/joystick_reader.cc
+++ b/y2019/joystick_reader.cc
@@ -673,5 +673,5 @@
event_loop.Run();
- ::aos::Cleanup();
+ return 0;
}
diff --git a/y2020/actors/autonomous_actor_main.cc b/y2020/actors/autonomous_actor_main.cc
index 99563ee..b242e05 100644
--- a/y2020/actors/autonomous_actor_main.cc
+++ b/y2020/actors/autonomous_actor_main.cc
@@ -15,6 +15,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2020/control_loops/drivetrain/drivetrain_main.cc b/y2020/control_loops/drivetrain/drivetrain_main.cc
index 7804814..38a1b0d 100644
--- a/y2020/control_loops/drivetrain/drivetrain_main.cc
+++ b/y2020/control_loops/drivetrain/drivetrain_main.cc
@@ -22,6 +22,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2020/control_loops/drivetrain/drivetrain_replay.cc b/y2020/control_loops/drivetrain/drivetrain_replay.cc
index faf2cef..5a97943 100644
--- a/y2020/control_loops/drivetrain/drivetrain_replay.cc
+++ b/y2020/control_loops/drivetrain/drivetrain_replay.cc
@@ -65,6 +65,5 @@
reader.event_loop_factory()->Run();
- aos::Cleanup();
return 0;
}
diff --git a/y2020/control_loops/superstructure/superstructure_main.cc b/y2020/control_loops/superstructure/superstructure_main.cc
index aa74d56..c0ac956 100644
--- a/y2020/control_loops/superstructure/superstructure_main.cc
+++ b/y2020/control_loops/superstructure/superstructure_main.cc
@@ -15,6 +15,5 @@
event_loop.Run();
- ::aos::Cleanup();
return 0;
}
diff --git a/y2020/joystick_reader.cc b/y2020/joystick_reader.cc
index 2049e83..5825475 100644
--- a/y2020/joystick_reader.cc
+++ b/y2020/joystick_reader.cc
@@ -196,5 +196,5 @@
event_loop.Run();
- ::aos::Cleanup();
+ return 0;
}
diff --git a/y2020/setpoint_setter.cc b/y2020/setpoint_setter.cc
index 1cbc518..f4aa03a 100644
--- a/y2020/setpoint_setter.cc
+++ b/y2020/setpoint_setter.cc
@@ -30,5 +30,5 @@
setpoint_builder.add_hood(FLAGS_hood);
builder.Send(setpoint_builder.Finish());
- aos::Cleanup();
+ return 0;
}