> > Personally I think that non binary format is better when applicable - > > this mean issm file (you can say it is Plan9 style...). It would not > > necessarily use the open method. You may want to use the write method > > and to enable everyone read the file. This read may return the pid of > > the owner (== the first to write something into the file). > > [... ] > > Ugh ... reads returning a value different from write. >
Michael, I think you are confusing things. Read may return a different value then write. There are many examples to that: pipes, named sockets, device files, etc. What you probably mean is that read and write should use the same type. This is OK. You can write your pid if you want. Anyway it is a minor issue. > In my humble opinion, the cleanest approach would be to simply have > a file which we can write 1 toset is sm and 0 to clean is sm, > read returning the current value. > > Close would clean the bit, if set. > > If set to 1, write of 1 would fail. > > I think this is almost implementable over sysfs, except that > we dont get a hook on "close". Maybe we shall just try to add > a "close" hook to sysfs, and push it upstream? > Thinking about it, I think there is another alternative which maybe cleaner: automatically raise the issm bit if someone registers to answer sminfo attr. The cleanup will be of course when it will be de-registered. There is a lot of sense in it: if you set the issm you should be expected to reply sminfo. Roland (or everybody) what do you think about that? Shahar _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
