Merge "Changing y2019 to absl::call_once()"
diff --git a/aos/ipc_lib/BUILD b/aos/ipc_lib/BUILD
index 1e8b118..684620a 100644
--- a/aos/ipc_lib/BUILD
+++ b/aos/ipc_lib/BUILD
@@ -13,7 +13,7 @@
     ],
     deps = [
         "//aos:macros",
-        "//aos:once",
+        "@com_google_absl//absl/base",
         "//aos/logging",
         "//aos/util:compiler_memory_barrier",
     ],
diff --git a/aos/ipc_lib/aos_sync.cc b/aos/ipc_lib/aos_sync.cc
index 101a189..3962467 100644
--- a/aos/ipc_lib/aos_sync.cc
+++ b/aos/ipc_lib/aos_sync.cc
@@ -29,7 +29,7 @@
 #include "aos/logging/logging.h"
 #include "aos/macros.h"
 #include "aos/util/compiler_memory_barrier.h"
-#include "aos/once.h"
+#include "absl/base/call_once.h"
 
 using ::aos::linux_code::ipc_lib::FutexAccessorObserver;
 
@@ -377,11 +377,10 @@
   my_tid = 0;
 }
 
-void *InstallAtforkHook() {
+void InstallAtforkHook() {
   if (pthread_atfork(NULL, NULL, atfork_child) != 0) {
     AOS_PLOG(FATAL, "pthread_atfork(NULL, NULL, %p) failed", atfork_child);
   }
-  return nullptr;
 }
 
 // This gets called to set everything up in a new thread by get_tid().
@@ -601,8 +600,8 @@
 
   my_tid = do_get_tid();
 
-  static ::aos::Once<void> atfork_hook_installed(InstallAtforkHook);
-  atfork_hook_installed.Get();
+  static absl::once_flag once_;
+  absl::call_once(once_, InstallAtforkHook);
 
   my_robust_list::Init();
 }
diff --git a/y2018/BUILD b/y2018/BUILD
index fc2aae8..d7cc2fd 100644
--- a/y2018/BUILD
+++ b/y2018/BUILD
@@ -49,7 +49,6 @@
     ],
     visibility = ["//visibility:public"],
     deps = [
-        "//aos:once",
         "//aos/logging",
         "//aos/mutex",
         "//aos/network:team_number",
diff --git a/y2018/constants.cc b/y2018/constants.cc
index 97a62a1..ea21a5b 100644
--- a/y2018/constants.cc
+++ b/y2018/constants.cc
@@ -13,7 +13,6 @@
 #include "aos/logging/logging.h"
 #include "aos/mutex/mutex.h"
 #include "aos/network/team_number.h"
-#include "aos/once.h"
 
 #include "y2018/control_loops/drivetrain/drivetrain_dog_motor_plant.h"
 #include "y2018/control_loops/drivetrain/polydrivetrain_dog_motor_plant.h"