summaryrefslogtreecommitdiffstats
path: root/tapset/ioblock.stp
diff options
context:
space:
mode:
authorfche <fche>2007-09-24 18:16:16 +0000
committerfche <fche>2007-09-24 18:16:16 +0000
commitda64b256d828a33ff5c3bd78b11aad3705056019 (patch)
tree9c50226dbe4c63b29ee1395327d4f07a05ca16ba /tapset/ioblock.stp
parentb8037bcbc882bad9bf1749c1272a8d927c6972a1 (diff)
downloadsystemtap-steved-da64b256d828a33ff5c3bd78b11aad3705056019.tar.gz
systemtap-steved-da64b256d828a33ff5c3bd78b11aad3705056019.tar.xz
systemtap-steved-da64b256d828a33ff5c3bd78b11aad3705056019.zip
Add /* pure */ to embedded-C functions.
Diffstat (limited to 'tapset/ioblock.stp')
-rw-r--r--tapset/ioblock.stp16
1 files changed, 6 insertions, 10 deletions
diff --git a/tapset/ioblock.stp b/tapset/ioblock.stp
index d2efd525..94781c04 100644
--- a/tapset/ioblock.stp
+++ b/tapset/ioblock.stp
@@ -14,7 +14,7 @@
/* get i-node number of mapped file */
function __bio_ino:long(bio:long)
-%{
+%{ /* pure */
struct bio *bio = (struct bio *)(long)THIS->bio;
struct page *bv_page = bio? kread(&(bio->bi_io_vec[0].bv_page)) : NULL;
struct address_space *mapping;
@@ -33,7 +33,7 @@ function __bio_ino:long(bio:long)
/* returns 0 for read, 1 for write */
function bio_rw_num:long(rw:long)
-%{
+%{ /* pure */
long rw = (long)THIS->rw;
THIS->__retvalue = (rw & (1 << BIO_RW));
%}
@@ -46,7 +46,7 @@ function bio_rw_str(rw)
/* returns start sector */
function __bio_start_sect:long(bio:long)
-%{
+%{ /* pure */
struct bio *bio = (struct bio *)(long)THIS->bio;
struct block_device *bi_bdev = bio? kread(&(bio->bi_bdev)) : NULL;
struct hd_struct *bd_part = bi_bdev? kread(&(bi_bdev->bd_part)) : NULL;
@@ -59,7 +59,7 @@ function __bio_start_sect:long(bio:long)
/* returns the block device name */
function __bio_devname:string(bio:long)
-%{
+%{ /* pure */
char b[BDEVNAME_SIZE];
struct bio *bio = (struct bio *)(long)THIS->bio;
struct block_device *bdev = kread(&(bio->bi_bdev));
@@ -72,12 +72,8 @@ function __bio_devname:string(bio:long)
CATCH_DEREF_FAULT();
%}
-global BIO_READ, BIO_WRITE
-probe begin
-{
- BIO_READ = 0
- BIO_WRITE = 1
-}
+global BIO_READ = 0, BIO_WRITE = 1
+
/* probe ioblock.request
*