Fix some copyright lines in folly/experimental/symbolizer/
[folly.git] / folly / experimental / symbolizer / SignalHandler.h
index 2c13b1948407c165d48db2ec6cf90d995d398566..aa8517a5c2f20464b66a1c1442903bb74d2dd571 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2013 Facebook, Inc.
+ * Copyright 2013-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#ifndef FOLLY_SYMBOLIZER_SIGNALHANDLER_H_
-#define FOLLY_SYMBOLIZER_SIGNALHANDLER_H_
+#pragma once
 
 #include <functional>
 
-namespace folly { namespace symbolizer {
+namespace folly {
+namespace symbolizer {
 
 /**
  * Install handler for fatal signals. The list of signals being handled is in
@@ -30,7 +30,6 @@ namespace folly { namespace symbolizer {
  */
 void installFatalSignalHandler();
 
-
 /**
  * Add a callback to be run when receiving a fatal signal. They will also
  * be called by LOG(FATAL) and abort() (as those raise SIGABRT internally).
@@ -39,12 +38,15 @@ void installFatalSignalHandler();
  * LOG(...) or printf or malloc / new or doing anything even remotely fun.
  *
  * All these fatal callback must be added before calling
- * installFatalSignalHandler().
+ * installFatalSignalCallbacks(), below.
  */
-void addFatalSignalCallback(std::function<void()> callback);
-
-
-}}  // namespaces
-
-#endif /* FOLLY_SYMBOLIZER_SIGNALHANDLER_H_ */
+typedef void (*SignalCallback)();
+void addFatalSignalCallback(SignalCallback callback);
 
+/**
+ * Install the fatal signal callbacks; fatal signals will call these
+ * callbacks in the order in which they were added.
+ */
+void installFatalSignalCallbacks();
+} // namespace symbolizer
+} // namespace folly