コード例 #1
0
ファイル: Task.cs プロジェクト: migueldeicaza/FuchsiaSharp
 extern static ZxStatus task_bind_exception_port(uint handle, uint port, ulong key, ZxExceptionOptions options);
コード例 #2
0
ファイル: Task.cs プロジェクト: migueldeicaza/FuchsiaSharp
 /// <summary>
 /// Binds the exception port corresponding to a given job, process, or thread.
 /// </summary>
 /// <returns>
 ///    <list type="bullet">
 ///    <item>
 ///      <term>Ok</term>
 ///      <description>
 ///        on success.
 ///      </description>
 ///    </item>
 ///    <item>
 ///      <term>ErrAlreadyBound</term>
 ///      <description>
 ///        handle already has its exception port bound.
 ///      </description>
 ///    </item>
 ///    <item>
 ///      <term>ErrBadHandle</term>
 ///      <description>
 ///        handle is not a valid handle, or port is not a valid handle. Note that when unbinding from an exception port port is ZX_HANDLE_INVALID.
 ///      </description>
 ///    </item>
 ///    <item>
 ///      <term>ErrBadState</term>
 ///      <description>
 ///        Unbinding a port that is not currently bound.
 ///      </description>
 ///    </item>
 ///    <item>
 ///      <term>ErrWrongType</term>
 ///      <description>
 ///        handle is not that of a job, process, or thread, and is not ZX_HANDLE_INVALID, or port is not that of a port and is not ZX_HANDLE_INVALID.
 ///      </description>
 ///    </item>
 ///    <item>
 ///      <term>ErrInvalidArgs</term>
 ///      <description>
 ///        A bad value has been passed in options.
 ///      </description>
 ///    </item>
 ///    <item>
 ///      <term>ErrNoMemory</term>
 ///      <description>
 ///        Failure due to lack of memory. There is no good way for userspace to handle this (unlikely) error. In a future build this error will no longer occur.
 ///      </description>
 ///    </item>
 /// </list>
 /// </returns>
 /// <param name="port">an IO port created by Port.Create(). The same IO port can be bound to multiple objects.</param>
 /// <param name="key">is passed back in exception reports, and is part of the port message protocol.</param>
 /// <param name="options">Options.</param>
 /// <remarks>When a port is bound to the exception port of an object it participates in exception processing. See below for how exceptions are processed.</remarks>
 public ZxStatus BindExceptionPort(Port port, ulong key, ZxExceptionOptions options = ZxExceptionOptions.None)
 {
     return(task_bind_exception_port((uint)handle, (uint)port.DangerousGetHandle(), key, options));
 }