Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added constants for Unix Implementations in OMRSOCK API #4878

Merged
merged 6 commits into from
Mar 13, 2020

Conversation

caohaley
Copy link
Contributor

@caohaley caohaley commented Feb 29, 2020

  • Added defintions for constants for OMRSOCK API
  • Added OS definitions for constants needed by OMRSOCK API
  • Added OMR to OS dependent constants mapping
  • Added OS to OMR constants mapping
  • Fixed current implementations to accept constants
  • Change current test cases to use the new constants

Depends on PR: #4832

Issue: #4795

Added new definitions in omrportsock.h to be used by users

- The users will use the constants defined here for function
  calls in omrsock_addrinfo_create_hints and omrsock_socket,
  and so on.
- More defined constants will be added here in the future.

Issue: eclipse-omr#4795

Co-authored-by: Babneet Singh <sbabneet@ca.ibm.com>
Co-authored-by: Robert Young <rwy0717@gmail.com>

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
@caohaley
Copy link
Contributor Author

@babsingh Ready for review.

port/unix/omrsock.c Outdated Show resolved Hide resolved
port/unix/omrsock.c Outdated Show resolved Hide resolved
port/unix_include/omrsock.h Outdated Show resolved Hide resolved
port/unix/omrsock.c Outdated Show resolved Hide resolved
port/unix/omrsock.c Outdated Show resolved Hide resolved
port/unix/omrsock.c Outdated Show resolved Hide resolved
port/unix_include/omrsock.h Outdated Show resolved Hide resolved
Haley Cao added 5 commits March 12, 2020 21:05
Added os dependent constants for mapping OMRSOCK constants

- These constants will be mapped to the OMRSOCK constants,
  which the users will use.
- These constants are not used by the users and will be hidden
  from the users.
- There will be internal mapping functions inside omrsock.c
  to map the two constants so that these constants are hidden
  from users.

Issue: eclipse-omr#4795

Co-authored-by: Babneet Singh <sbabneet@ca.ibm.com>
Co-authored-by: Robert Young <rwy0717@gmail.com>

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
Added constants mapping for implementing omrsock_socket

- These constants are mapping OMR user interface constants
  to OS dependent constants, which will be needed by the
  system socket function to create a socket.
- These are added for isolating the users from the system
  constants.
- Functions needing to convert OMR to OS constants includes
  omrsock_getaddrinfo_create_hints and omrsock_socket

Issue: eclipse-omr#4795

Co-authored-by: Babneet Singh <sbabneet@ca.ibm.com>
Co-authored-by: Robert Young <rwy0717@gmail.com>

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
Added constants mapping for implementing omrsock_socket

- These are for mapping OS dependent constants to OMR user
  interface.
- Thse are added to isolate users from system constants.
- Functing neeting this converting includes omrsock_getaddrinfo_family,
  omrsock_getaddrinfo_socktype, omrsock_getaddrinfo_protocol.

Issue: eclipse-omr#4795

Co-authored-by: Babneet Singh <sbabneet@ca.ibm.com>
Co-authored-by: Robert Young <rwy0717@gmail.com>

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
Fixed unix/omrsock.c to accept constants defined

- Changed omrsock_getaddrinfo_create_hints so that it now
  accepts OMR defined constants and changes it to OS
  dependent constants.
- Changed omrsock_getaddrinfo_family, sockType, and protocol
  to map to and return OMR defined constants.

Issue: eclipse-omr#4795

Co-authored-by: Babneet Singh <sbabneet@ca.ibm.com>
Co-authored-by: Robert Young <rwy0717@gmail.com>

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
Change the family, socktype, protocols to defined constants

- Changed both test cases to accept and test new constants in
  test cases.

Issue: eclipse-omr#4795

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
@caohaley
Copy link
Contributor Author

@rwy0717 Ready for another round of review.

@rwy7
Copy link
Contributor

rwy7 commented Mar 13, 2020

@genie-omr build all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants