-
-
Notifications
You must be signed in to change notification settings - Fork 411
Added aio.h implementations for FreeBSD, NetBSD and DragonFly #2133
Conversation
|
Thanks for your pull request and interest in making D better, @dkgroot! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + druntime#2133" |
d0e6b37 to
3ab765b
Compare
src/core/sys/posix/aio.d
Outdated
| struct __aiocb_private { | ||
| long status; | ||
| long error; | ||
| void *kernelinfo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably use D style type here, and in other places (void* foo, not void *foo).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q:Would it make sense to to extend checkwhitespace.d to also check for this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a much more comprehensive lint used for phobos, so we should probably replace checkwhitespace with that and spend effort on something that may be replaced in the future.
src/core/sys/posix/aio.d
Outdated
| private ssize_t _retval; | ||
| } | ||
|
|
||
| version = bsd_posix; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this, does it really make things easier to have this instead of specific versions?
Don't mind either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given how small this module is, I mean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it focusses the attention on the difference between the enums' ordering (I was actually a little surprised that open groups posix specification does not state the values for these constants :-))
Would be happy to change it though, let's see if somebody would like it changed as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we proceed with removing version = bsd_posix? Just to speed up pulling this in, as this is the only part I'm hesitant about here.
|
BTW: Would it be helpfull to copy the comments/documentation over from the linux/bsd header files. I noticed that some of the other sys/posix/*.d files did have this ? |
1ee0732 to
dee866d
Compare
|
@dkgroot AFAIK we avoid copying comments since they are covered by copyright, unlike pure API bindings. |
PetarKirov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, modulo a few style nits.
src/core/sys/posix/aio.d
Outdated
| } | ||
| else version (FreeBSD) | ||
| { | ||
| struct __aiocb_private { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put brace on next line.
src/core/sys/posix/aio.d
Outdated
| LIO_READ, | ||
| LIO_WRITE, | ||
| LIO_NOP | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove semicolon.
src/core/sys/posix/aio.d
Outdated
| /* functions outside/extending posix requirement */ | ||
| version (FreeBSD) | ||
| { | ||
| int aio_waitcomplete(aiocb ** aiocb_list, const(timespec)* timeout); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aiocb**
|
Ping @MartinNowak @CyberShadow |
1 similar comment
|
Ping @MartinNowak @CyberShadow |
|
I don't use these operating systems so I can't really vouch for this, but the diff looks good. Would you mind squashing the changes from the last commit into the first two? |
|
@CyberShadow Thanks for checking. Do you know anybody who does use one of the BSD's for checking/testing ? If so can you add them as a reviewer ? |
Yep, my suggestion was to just get rid of the third commit, and leave the first two separate.
Other than the people already in this thread, I don't think so; so, we might as well merge this after the fixup. |
|
Does one of you know why auto-tester fails on linux_64_32 for this change, i don't see how 'std/regex/internal/tests.d' could be related to these changes. Maybe it's just an unrelated regression. |
|
Spurious failure because std.regex's CTFE tests consumes so much memory (see e.g. dlang/phobos#6164) |
|
@wilzbach Thanks for the heads-up ! |
|
version (X86_64) } |
|
@wilzbach Not sure how this came to be (It has been a couple of weeks). It looks like the BSD versions are at the wrong version scope (indentation). Thanks for noticing/finding this ! |
59c967e to
c10c6d0
Compare
ibuclaw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just proceed. As the incomplete implementation (unsupported cpu type is just plain wrong in the GNU path) is blocking me.
bsd_posix should perhaps by BSD_Posix?
Consists of two seperate commits:
Note:
ssize_t aio_return(const(aiocb)* aiocbp);should have beenssize_t aio_return(aiocb* aiocbp);(According to Linux, BSD's and OpenGroup-Posix )Port Requested by @ibuclaw : #2074 (comment)
Ping @Darredevil