| 1 | .\" Copyright (c) 2005-2008 David Carter <dcarter@arm4.org> and others. |
|---|
| 2 | .\" All rights reserved. This program and the accompanying materials |
|---|
| 3 | .\" are made available under the terms of the Eclipse Public License v1.0 |
|---|
| 4 | .\" which accompanies this distribution, and is available at |
|---|
| 5 | .\" http://www.eclipse.org/legal/epl-v10.html |
|---|
| 6 | .TH "arm_unbind_thread" 3 "August 2008" "arm4.org" "ARM 4 Programmer's Manual" |
|---|
| 7 | .SH NAME |
|---|
| 8 | arm_unbind_thread \- unbind a thread |
|---|
| 9 | .SH SYNOPSIS |
|---|
| 10 | .B #include <arm4.h> |
|---|
| 11 | .sp |
|---|
| 12 | \fBarm_error_t |
|---|
| 13 | .br |
|---|
| 14 | arm_unbind_thread( |
|---|
| 15 | .br |
|---|
| 16 | const arm_tran_start_handle_t \fItran_handle\fB, |
|---|
| 17 | .br |
|---|
| 18 | const arm_int32_t \fIflags\fB, |
|---|
| 19 | .br |
|---|
| 20 | const arm_buffer4_t *\fIbuffer4\fB);\fR |
|---|
| 21 | .SH DESCRIPTION |
|---|
| 22 | \fBarm_unbind_thread()\fR indicates that the thread from which it is called is no longer performing on |
|---|
| 23 | behalf of the transaction identified by the start handle. |
|---|
| 24 | |
|---|
| 25 | Call \fBarm_unbind_thread()\fR when a thread is no longer executing a transaction. The thread |
|---|
| 26 | binding is useful for managing computing resources at a finer level of granularity than the |
|---|
| 27 | process. It should be called when, for this transaction and this thread, either: |
|---|
| 28 | .IP * |
|---|
| 29 | \fBarm_bind_thread()\fR was previously called, or |
|---|
| 30 | .IP * |
|---|
| 31 | The \fBARM_FLAG_BIND_THREAD\fR flag was set in the \fBarm_start_transaction()\fR call. |
|---|
| 32 | .P |
|---|
| 33 | \fBarm_stop_transaction()\fR is an implicit \fBarm_unbind_thread()\fR for any threads still bound to the |
|---|
| 34 | transaction instance [\fBarm_bind_thread()\fR issued without a matching \fBarm_unbind_thread()\fR]. As |
|---|
| 35 | long as the transaction is bound to the thread when the \fBarm_stop_transaction()\fR executes, there is |
|---|
| 36 | no need nor any value in calling \fBarm_unbind_thread()\fR before calling \fBarm_stop_transaction()\fR. |
|---|
| 37 | |
|---|
| 38 | \fIbuffer4\fR is a pointer to the user data buffer, if any. If the pointer is null, there is no buffer. No |
|---|
| 39 | sub-buffer types are currently valid with this function call, so the pointer should be |
|---|
| 40 | null (\fBARM_BUF4_NONE\fR). |
|---|
| 41 | |
|---|
| 42 | \fIflags\fR contains 32-bit flags. No values are currently defined. The field should be zero |
|---|
| 43 | (\fBARM_FLAG_NONE\fR). |
|---|
| 44 | |
|---|
| 45 | \fItran_handle\fR is a handle returned in an out parameter from an \fBarm_start_transaction()\fR call in the |
|---|
| 46 | same process. |
|---|
| 47 | |
|---|
| 48 | .SH "RETURN VALUE" |
|---|
| 49 | On success, the function returns \fBARM_SUCCESS\fR. A non-zero value indicates |
|---|
| 50 | an error. |
|---|
| 51 | .SH ERRORS |
|---|
| 52 | If the return code is negative, an error occurred. If the return code is not negative, an error may |
|---|
| 53 | or may not have occurred - the determination of what is an error and whether an error code is |
|---|
| 54 | returned is at the discretion of the ARM implementation. The application can test the return code |
|---|
| 55 | if it wants to provide its own error logging. |
|---|
| 56 | |
|---|
| 57 | This implementation returns no errors for \fBarm_unbind_thread()\fR. |
|---|
| 58 | .SH "CONFORMING TO" |
|---|
| 59 | ARM Issue 4.0 C Language Bindings, Version 2 |
|---|
| 60 | .SH EXAMPLE |
|---|
| 61 | None. |
|---|
| 62 | .SH "SEE ALSO" |
|---|
| 63 | .BR arm_bind_thread (3), |
|---|
| 64 | .BR arm_start_transaction (3), |
|---|
| 65 | .BR arm_stop_transaction (3) |
|---|