[Vm-dev] Adding new primitives to FilePlugin

Holger Freyther holger at freyther.de
Fri Sep 23 08:40:15 UTC 2016


Good Morning,

with UFFI it is easy to call OS functions that return a filedescriptor (e.g. inotify, timerfd, kqueue) but it is then difficult to use it. Classes like AioEventHandler or AttachableFileStream need the fileID (SQFile) but currently there is no way to create a SQFile from a int/FILE*.

I would like to propose two new primitives:

	>>#primitiveFileOpenUseFileDescriptor [1]
	>>#primitiveFileOpenUseFile [2]

and the first implementation[3]. What does it take to get this into the FilePlugin? 

regards
	holger



[1] https://github.com/zecke/pharo-vm/blob/dd74059acb55fc9e3da4756ff7a751adecce76e2/mc/VMMaker.oscog.package/FilePlugin.class/instance/primitiveFileOpenUseFileDescriptor.st

[2] https://github.com/zecke/pharo-vm/blob/dd74059acb55fc9e3da4756ff7a751adecce76e2/mc/VMMaker.oscog.package/FilePlugin.class/instance/primitiveFileOpenUseFile.st

[3] https://github.com/zecke/pharo-vm/commit/dd74059acb55fc9e3da4756ff7a751adecce76e2#diff-9bbe8b1dab4518d9de3cc7326295466bR296


More information about the Vm-dev mailing list