@@ -955,7 +955,7 @@ \subsection{\code{PMIx_server_deregister_resources}}
955955
956956A \code {NULL} \refarg {cbfunc} reference indicates that the function is to be executed as a blocking operation.
957957% TODO: If this is one of those functions that can be blocking or non-blocking, then
958- % it needs a full return code explanation, not the returnsimple
958+ % it needs a full return code explanation, not the returnsimple
959959
960960\advicermend
961961
@@ -1995,7 +1995,7 @@ \subsection{\code{pmix_server_module_t} Module}
19951995 /* v2x interfaces */
19961996 pmix_server_notify_event_fn_t notify_event;
19971997 pmix_server_query_fn_t query;
1998- pmix_server_tool_connection_fn_t tool_connected;
1998+ pmix_server_tool_connection_fn_t tool_connected; // DEPRECATED
19991999 pmix_server_log_fn_t log;
20002000 pmix_server_alloc_fn_t allocate;
20012001 pmix_server_job_control_fn_t job_control;
@@ -2009,6 +2009,7 @@ \subsection{\code{pmix_server_module_t} Module}
20092009 pmix_server_grp_fn_t group;
20102010 pmix_server_fabric_fn_t fabric;
20112011 pmix_server_client_connected2_fn_t client_connected2;
2012+ pmix_server_tool_connection2_fn_t tool_connected2;
20122013\} pmix_server_module_t;
20132014\end {codepar }
20142015\cspecificend
@@ -3246,8 +3247,9 @@ \subsection{\code{pmix_server_query_fn_t}}
32463247
32473248
32483249% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3249- \subsection {\code {pmix_server_tool_connection_fn_t} }
3250- \declareapi {pmix_server_tool_connection_fn_t}
3250+ \versionMarkerProvisional {6.0}
3251+ \subsection {\code {pmix_server_tool_connection2_fn_t} }
3252+ \declareapi {pmix_server_tool_connection2_fn_t}
32513253
32523254% %%%
32533255\summary
@@ -3257,8 +3259,8 @@ \subsection{\code{pmix_server_tool_connection_fn_t}}
32573259% %%%
32583260\format
32593261
3260- \copySignature {pmix_server_tool_connection_fn_t}{2 .0}{
3261- typedef void (*pmix_server_tool_connection_fn_t )( \\
3262+ \copySignature {pmix_server_tool_connection2_fn_t}{6 .0}{
3263+ typedef pmix_status_t (*pmix_server_tool_connection2_fn_t )( \\
32623264\hspace *{29\sigspace }pmix_info_t info[], size_t ninfo, \\
32633265\hspace *{29\sigspace }pmix_tool_connection_cbfunc_t cbfunc, \\
32643266\hspace *{29\sigspace }void *cbdata);
@@ -3271,6 +3273,15 @@ \subsection{\code{pmix_server_tool_connection_fn_t}}
32713273\argin {cbdata}{Data to be passed to the callback function (memory reference)}
32723274\end {arglist }
32733275
3276+ Returns one of the following:
3277+
3278+ \begin {itemize }
3279+ \item \refconst {PMIX_SUCCESS}, indicating that the request is being processed by the host environment - result will be returned in the provided \refarg {cbfunc}.
3280+ \item \refconst {PMIX_OPERATION_SUCCEEDED}, indicating that the request was immediately processed and returned \textit {success } - the \refarg {cbfunc} will not be called
3281+ \item \refconst {PMIX_ERR_NOT_SUPPORTED}, indicating that the host environment does not support the request, even though the function entry was provided in the server module - the \refarg {cbfunc} will not be called
3282+ \item a PMIx error constant indicating either an error in the input or that the request was immediately processed and failed - the \refarg {cbfunc} will not be called
3283+ \end {itemize }
3284+
32743285\reqattrstart
32753286\ac {PMIx} libraries are required to pass the following attributes in the \refarg {info} array:
32763287
@@ -3307,19 +3318,20 @@ \subsection{\code{pmix_server_tool_connection_fn_t}}
33073318If the tool already has an assigned process identifier, then this must be
33083319indicated in the \refarg {info} array. The host is responsible for checking
33093320that the provided namespace does not conflict with any currently known
3310- assignments, returning an appropriate error in the callback function if a conflict is found.
3321+ assignments, returning an appropriate error (either directly or in the
3322+ callback function) if a conflict is found.
33113323
33123324The host environment is solely responsible for authenticating and authorizing
33133325the connection using whatever means it deems appropriate. If certificates or
33143326other authentication information are required, then the tool must provide them.
33153327The conclusion of those operations shall be communicated back to the \ac {PMIx}
33163328server library via the callback function.
33173329
3318- Approval or rejection of the connection request shall be returned in the
3330+ Approval or rejection of the connection request shall be returned either directly
3331+ or in the
33193332\refarg {status} parameter of the \refapi {pmix_tool_connection_cbfunc_t}. If
33203333the connection is refused, the \ac {PMIx} server library must terminate the
3321- connection attempt. The host must not execute the callback function prior to
3322- returning from the \ac {API}.
3334+ connection attempt.
33233335
33243336% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33253337\subsubsection {Tool connection attributes }
@@ -3374,6 +3386,61 @@ \subsubsection{PMIx Tool Connection Callback Function}
33743386\advicermend
33753387
33763388
3389+ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3390+ \subsection {\code {pmix_server_tool_connection_fn_t} }
3391+ \declareapi {pmix_server_tool_connection_fn_t}
3392+
3393+ % %%%
3394+ \summary
3395+
3396+ Register that a tool has connected to the server.
3397+
3398+ % %%%
3399+ \format
3400+
3401+ \copySignature {pmix_server_tool_connection_fn_t}{2.0}{
3402+ typedef pmix_status_t (*pmix_server_tool_connection_fn_t)( \\
3403+ \hspace *{29\sigspace }pmix_info_t info[], size_t ninfo, \\
3404+ \hspace *{29\sigspace }pmix_tool_connection_cbfunc_t cbfunc, \\
3405+ \hspace *{29\sigspace }void *cbdata);
3406+ }
3407+
3408+ \begin {arglist }
3409+ \argin {info}{Array of \refstruct {pmix_info_t} structures (array of handles)}
3410+ \argin {ninfo}{Number of elements in the \refarg {info} array (integer)}
3411+ \argin {cbfunc}{Callback function \refapi {pmix_tool_connection_cbfunc_t} (function reference)}
3412+ \argin {cbdata}{Data to be passed to the callback function (memory reference)}
3413+ \end {arglist }
3414+
3415+ \reqattrstart
3416+ \ac {PMIx} libraries are required to pass the following attributes in the \refarg {info} array:
3417+
3418+ \pasteAttributeItem {PMIX_USERID}
3419+ \pasteAttributeItem {PMIX_GRPID}
3420+ \pasteAttributeItemBegin {PMIX_TOOL_NSPACE}This must be included only if the tool already has an assigned namespace.
3421+ \pasteAttributeItemEnd {}
3422+ \pasteAttributeItemBegin {PMIX_TOOL_RANK}This must be included only if the tool already has an assigned rank.
3423+ \pasteAttributeItemEnd {}
3424+ \pasteAttributeItem {PMIX_CREDENTIAL}
3425+
3426+ \reqattrend
3427+
3428+
3429+ \optattrstart
3430+ The following attributes are optional for host environments that support this operation:
3431+
3432+ \pasteAttributeItem {PMIX_FWD_STDOUT}
3433+ \pasteAttributeItem {PMIX_FWD_STDERR}
3434+ \pasteAttributeItem {PMIX_FWD_STDIN}
3435+ \pasteAttributeItem {PMIX_VERSION_INFO}
3436+
3437+ \optattrend
3438+
3439+ % %%%
3440+ \descr
3441+
3442+ This function module entry has been \textbf {DEPRECATED } in favor of \refapi {pmix_server_tool_connection2_fn_t}
3443+
33773444% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33783445\subsection {\code {pmix_server_log_fn_t} }
33793446\declareapi {pmix_server_log_fn_t}
0 commit comments