NIM services: Difference between revisions

No edit summary
Line 1,040: Line 1,040:


The Receive async [[#RequestLocalCommunicationReceiveSystemUpdateTaskRun|thread]] does the following:
The Receive async [[#RequestLocalCommunicationReceiveSystemUpdateTaskRun|thread]] does the following:
* Sets the <code>nn::fs::PriorityRaw</code> using a value loaded from state.
* [?+] Sets the <code>nn::fs::PriorityRaw</code> using a value loaded from state.
* Calls a func, and writes the returned Result into state.
* Calls a func, and writes the returned Result into state.
* Signals the async Event and returns.
* Signals the async Event and returns.
Line 1,049: Line 1,049:
* This is identical to the Receive thread except the called func is different.
* This is identical to the Receive thread except the called func is different.
** That func does:
** That func does:
** Gets [[System_Settings|system-setting]] <code>nim.errorsimulate!error_localcommunication_result</code>, returning that as an error if set + non-zero.
** [?+] Gets [[System_Settings|system-setting]] <code>nim.errorsimulate!error_localcommunication_result</code>, returning that as an error if set + non-zero.
** Does socket setup:
** Does socket setup:
** Calls a func.
** Calls a func.
Line 1,068: Line 1,068:
* The following is done after the loop:
* The following is done after the loop:
* u64 tmpval=1; setsockopt(sockfd, SOL_SOCKET, SO_VENDOR + 0x1, &tmpval, sizeof(tmpval)); {handle error on fail}
* u64 tmpval=1; setsockopt(sockfd, SOL_SOCKET, SO_VENDOR + 0x1, &tmpval, sizeof(tmpval)); {handle error on fail}
* Uses [[Network_Interface_services|nifm]] GetInternetConnectionStatus, returning an error if this is successful. Hence, the output from this is ignored.
* [4.0.0-?] Uses [[Network_Interface_services|nifm]] GetInternetConnectionStatus, returning an error when the Result is 0xD46E ([?+] error is thrown when successful). Hence, the output from this is ignored.
* Uses fcntl with F_GETFL/F_SETFL to clear O_NONBLOCK with sockfd, handling error on fail.
* Uses fcntl with F_GETFL/F_SETFL to clear O_NONBLOCK with sockfd, handling error on fail.
* u32 tmpval2=0x4000;
* [4.0.0-?] u32 tmpval2=0x4000; u32 tmpval3=0x20000;
* u32 tmpval3=0x20000;
* [4.0.0-?] setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF, &tmpval2, sizeof(tmpval2)); {error is ignored}
* setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF, &tmpval2, sizeof(tmpval2)); {error is ignored}
* [4.0.0-?] setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, &tmpval3, sizeof(tmpval3)); {error is ignored}
* setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, &tmpval3, sizeof(tmpval3)); {error is ignored}
* Writes sockfd to the output state sockfd and returns 0.
* Writes sockfd to the output state sockfd and returns 0.
** The func used with the above loop does the following:
** The func used with the above loop does the following: