Date: Thu, 10 Dec 98 15:57:21 -0600 From: "Richard Seaman, Jr." <lists@tar.com> To: "hackers@freebsd.org" <hackers@FreeBSD.ORG> Subject: Re: pread/pwrite Message-ID: <199812102157.PAA27463@ns.tar.com>
next in thread | raw e-mail | index | archive | help
--_=_=_=IMA.BOUNDARY.F3ROVL138764=_=_=_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Thu, 10 Dec 98 15:56:01 -0600, Richard Seaman, Jr. wrote: >I don't know if there is any interest in X/Open pread, pwrite >calls. Essentially, they implement atomic seek/write and >atomic seek/read calls. They are more useful in threaded >apps where you would need a file lock between a seek/write >or seek/read, but even in single threaded apps can allow >you to avoid a syscall. > >Attached is an implementation. If there is interest, and >if the implementation meets with approval, I'll submit >a PR. Or, perhaps someone would want to commit it directly. > >I welcome any comments. Whoops. Forgot the attachment. --_=_=_=IMA.BOUNDARY.F3ROVL138764=_=_=_ Content-Type: application/octet-stream; name="preaddiffs.gz" Content-Transfer-Encoding: base64 H4sICPlBcDYAA3ByZWFkZGlmZnMA7Vp7U9tIEv/bfIoOe5UDIz8k2WCcI1UEnD3XEuyyzT5qb0sl pJGtQ5a0GhmWy+a7X/fMSJYcmYVLyO7dLQVoNNM909P964dGGoYu+6UPfugEK5e1VqHPU7e52Dn5 9J+dydkUPD9gfWgtoiVrhc4tb/HEaW2upt3uJCxNfHbrh3NI8ML9KAS9aRg7ru950HCgkdAt5ALW 6/X8pqYfH/da7aOWroNu9o1uv31cE9yNRmODSjdaehsMvd8x+m2Tpin+iGn19rGm6x0QHTSD7DgG bDd2ANgvKUtC1FkKUZz6oavRlSWJuOLvKyTC0RrMGd2CZY339rBDA2dhJ1AHJwp5Cj/+pKmW7N7f J8adA/jK99AsHlyOrKvL4XR2bo0ng1P8/91kOBsgAef+v5iFC8QJs10oLHAb+S7UNZAEKJDnWSlN XGS6S/yUFaUSQjzA+hUL0Q7YQPmUcDVrPJoOv7emo6vJ2UD2i24L5T2zLOzhabJyUkj9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CiGo/LVHTcyAeMbC/sf2TyDUpeKhxPia6YMMOi0qOhFhU3w4 o3j5cVYBkVVge1aprGmPuprRKxyzmB1T66w/yUG1x6KYCUg/0+HXKnTgCOW57VZ4fl2Lb3a0HEvP pHSZw+XDX0HdT8nhgrk6iW+cyH1SKleZW6z21NRdEPGPnbv/2zK3AOmfqfvzpG6hzD9z92Nzt3Dq 7clbevjvlb7FumtyAWtJV5lvDijf/CdZHzYsDk/JRPCkTFTxHE2pgjeXNoXJL/ckXVx1+1c8G5/x dGFTXvU0XezLv7ukD4KNfgcfkulErdvNnqcriB/xZuxI1zpHhTNd2ZE/UZvmYW06O6+9mZ7X3ovP g+mQhtRAn9kCmUF0qk9rVYbMPrhVb7c0eaCDPypRcM9auGkCdfqfsda5IhYTYxDn+6/EE71pHm3I cBO4/H4pJUBRfCWFs3Szr4VdO7UF+wGy9wS7+LYXJ1Av1dSDdraLvBAoy17eVz7jcfWMsgDIptyo MH5zYgXiFU+a137YSv04+3vuj9crl9x+FFQ+CQIpIKFJtNSb217L6EK7228bfZ3e3HYEvHKKR6Gz a2jdwmkP3ebl8VfZCdvf+DxN75uL19Qpg7384lx+XbT9i/PyJCLyqVnWvamL0e7jzsC/pt5/AxUc 6lpqMAAA --_=_=_=IMA.BOUNDARY.F3ROVL138764=_=_=_-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812102157.PAA27463>