summaryrefslogtreecommitdiffstats
path: root/tapset/builtin_logging.stp
diff options
context:
space:
mode:
Diffstat (limited to 'tapset/builtin_logging.stp')
-rw-r--r--tapset/builtin_logging.stp21
1 files changed, 21 insertions, 0 deletions
diff --git a/tapset/builtin_logging.stp b/tapset/builtin_logging.stp
new file mode 100644
index 00000000..51fb97e4
--- /dev/null
+++ b/tapset/builtin_logging.stp
@@ -0,0 +1,21 @@
+function _log (msg) %{
+ _stp_log (THIS->msg);
+%}
+
+function log (msg) {
+ _log (msg . "")
+}
+function _printk (msg) %{
+ printk (KERN_INFO "%s\n", THIS->msg);
+%}
+
+function printk (msg) {
+ _printk (msg . "")
+}
+function _warn (msg) %{
+ _stp_warn (THIS->msg);
+%}
+
+function warn (msg) {
+ _warn (msg . "")
+}