summaryrefslogtreecommitdiff
path: root/os/os-netbsd.h
AgeCommit message (Collapse)Author
2020-01-06Change off64_t into uint64_tBart Van Assche
off64_t is Linux specific while uint64_t is defined by a C standard. This change makes fio easier to port. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2019-05-22configure: add gettid() testJens Axboe
Apparently some newer glibcs now have it, decades after the fact. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-10-08Remove old OS dependent (unused) random codeJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2017-08-29cleanup NetBSD/OpenBSD headerTomohiro Kusumi
* NetBSD's <sys/rb.h> was renamed to <sys/rbtree.h> 7 years ago. * Drop unneeded undefs. Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2017-07-27os: add missing include for bswap_* on BSDsSitsofe Wheeler
Commit 0dcebdf4a70ef0d8144b8fcba763ae87e7fc74b5 ("configure: add endian check") removed the sys/endian.h include from the os/*.h BSD headers but this include is needed to access the bswap_* macros. The lack of this include wouldn't show up unless you were compiling for a big-endian BSD platform. This commit adds the include back for {Free,Net,Open}BSD and adds it for the first time to the DragonFlyBSD header. Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2017-04-30Drop triple X for cpu affinity for OpenBSDTomohiro Kusumi
(Sorry, resending this as gmail refused an email title including triple X) This isn't really a fio's TODO item since no such thing seems to exist (or have existed) in OpenBSD as of 2017, according to below reference. NetBSD is in more or less similar situation, except that NetBSD has pthread_[gs]etaffinity_np() for threads, though it has another problem that they don't take pid/tid. CPU affinity comes to OpenBSD (2009) http://undeadly.org/cgi?action=article&sid=20090324210236 tedu old comment about cpu affinity. (2012) http://openbsd-archive.7691.n7.nabble.com/tedu-old-comment-about-cpu-affinity-tt172330.html how to use cpu affinity from user space (2013) http://openbsd-archive.7691.n7.nabble.com/how-to-use-cpu-affinity-from-user-space-td222323.html Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> Signed-off-by: Jens Axboe <axboe@fb.com>
2017-03-13Use ENOTSUP if OS doesn't support blkdev page cache invalidationTomohiro Kusumi
The return value of blockdev_invalidate_cache() has been platform dependent (some pretend success, others return EINVAL) while Linux is the only one actually supports this via Linux specific ioctl. This commit makes all the rest return a consistent value ENOTSUP, so __file_invalidate_cache() prints a blkdev invalidation failure message that is consistent and makes sense. Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> Signed-off-by: Jens Axboe <axboe@fb.com>
2016-10-26Add blockdev_size() support for NetBSDTomohiro Kusumi
This commit is NetBSD version of 1116dc04 in 2015. NetBSD still has block device as a file type, thus it differs from FreeBSD/DragonFlyBSD regarding FIO_HAVE_CHARDEV_SIZE. Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com> Signed-off-by: Jens Axboe <axboe@fb.com>
2016-10-20Remove getopt_long_only macro from NetBSD headerTomohiro Kusumi
If CONFIG_GETOPT_LONG_ONLY isn't defined, fio is compiled with its own getopt_long_only(), so this macro is no longer needed. (os/os-netbsd.h was added before getopt_long_only() support) Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com> Signed-off-by: Jens Axboe <axboe@fb.com>
2016-10-17Add FIO_HAVE_FS_STAT/get_fs_free_size() support for NetBSDTomohiro Kusumi
This commit is NetBSD version of 60f840a8 in 2015. This is the same as 60f840a8, as it uses POSIX statvfs. (Note that the function was renamed with _free in c08ad04c) Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com> Signed-off-by: Jens Axboe <axboe@fb.com>
2013-01-23configure: add endian checkJens Axboe
Will remove guesswork and manual hacking in the OS headers. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-01-10Add configure scriptJens Axboe
Get rid of all the fragile guessing and checking of features, and roll a configure script instead. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-09-26netbsd: fix gettidRoger Pau Monne
Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-02-20Move Windows port to MinGWBruce Cran
- Add calls to WSAStartup in the network code as required by Winsock. - Add Windows-specific init_random_state function which uses the Crypto API. - Move Windows port to MinGW and update build system to create a 64-bit binary by default. - Install text files as .rtf so they won't open in Notepad by default (Wordpad understands Unix line endings; Notepad doesn't). - Simplify WiX installer code. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-10-07Pass arch/os in probeJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-10-04Finalize (?) byte swap/endian stuffJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-07-30Add proper include to silence build warning on NetBSD/FreeBSDJens Axboe
Reported-by: Bruce Cran <bruce@cran.org.uk> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2011-07-12gettid() for NetBSDJens Axboe
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2011-01-08Various fixes/updatesBruce Cran
- Update HOWTO to note that directio and fallocate don't work with ZFS on Solaris. Refactor the Makefile's to add CPPFLAGS and LIBS. - Add -fno-omit-frame-pointer from Linux Makefile to every platform - Change undefined $(ALL_CFLAGS) to $(CFLAGS) - Pass -std=gnu99, without which OS X fails to build. - Add -D__EXTENSIONS__ on Solaris since some functions we need are behind it. - Pull in <limits.h> in fio.c to get PTHREAD_STACK_MIN. - NetBSD doesn't define PTHREAD_STACK_MIN so set it to 4k in os-netbsd.h - If we have posix_fallocate don't error out if it fails during mutex and malloc operations since it will fail on Solaris with a ZFS filesystem. As I understand it these aren't performance-critical operations so do they need to be considered critical? - Remove fio_unused from os-* files since it's defined in fio.h and we don't really need it. - FreeBSD has an idprio command but not the API so don't claim it does. - OS X doesn't have the timer_* API so emulate it using setitimer/sigaction. - NetBSD and Solaris don't support CLOCK_MONOTONIC in timer_create so remove FIO_HAVE_CLOCK_MONOTONIC from their os-* files. I've noticed that a change I made a while ago to use fmin/fmax could cause issues on older OSes - I had a CD with NetBSD 5.0.2 and found they had only been implemented in 5.1 so I'm not sure if I should revert it. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2011-01-04OS headers need fio_file definition nowJens Axboe
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2011-01-04FIO Windows updateBruce Cran
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-05-21Add missing os/os-netbsd.h fileJens Axboe
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>