'\" te .\" Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved .TH td_thr_setsigpending 3C_DB "20 Oct 1998" "SunOS 5.11" "Threads Debugging Library Functions" .SH NAME td_thr_setsigpending, td_thr_sigsetmask \- manage thread signals for libc_db .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... -lc_db [ \fIlibrary\fR... ] #include #include \fBtd_err_e\fR \fBtd_thr_setsigpending\fR(\fBconst td_thrhandle_t *\fR \fIth_p\fR, \fBconst uchar_ t\fR \fIti_sigpending_flag\fR, \fBconst sigset_t\fR \fIti_sigmask\fR;); .fi .LP .nf \fBtd_err_e\fR \fBtd_thr_sigsetmask\fR(\fBconst td_thrhandle_t *\fR\fIth_p\fR, \fBconst sigset_t\fR \fIti_sigmask\fR); .fi .SH DESCRIPTION .sp .LP The \fBtd_thr_setsigpending()\fR and \fBtd_thr_setsigmask()\fR functions affect the signal state of the thread identified by \fIth_p\fR. .sp .LP The \fBtd_thr_setsigpending()\fR function sets the set of pending signals for thread \fIth_p\fR to \fIti_sigpending\fR. The value of the \fBlibc\fR-internal field that indicates whether a thread has any signal pending is set to \fIti_sigpending_flag\fR. To be consistent, \fIti_sigpending_flag\fR should be 0 if and only if all of the bits in \fIti_sigpending\fR are 0. .sp .LP The \fBtd_thr_sigsetmask()\fR function sets the signal mask of the thread \fIth_p\fR as if the thread had set its own signal mask with \fBthr_sigsetmask\fR(3C). The new signal mask is the value of \fBti_sigmask\fR. .sp .LP There is no equivalent to the \fBSIG_BLOCK\fR or \fBSIG_UNBLOCK\fR operations of \fBthr_sigsetmask\fR(3C), which mask or unmask specific signals without affecting the mask state of other signals. To block or unblock specific signals, .RS +4 .TP 1. stop either the entire process or the thread with \fBtd_thr_dbsuspend()\fR, .RE .RS +4 .TP 2. determine the thread's existing signal mask by calling \fBtd_thr_get_info\fR(3C_DB), .RE .RS +4 .TP 3. modify the \fIti_sigmask\fR member of the \fBtd_thrinfo_t\fR structure as desired, and .RE .RS +4 .TP 4. set the new signal mask with\fBtd_thr_sigsetmask()\fR. .RE .SH RETURN VALUES .sp .ne 2 .mk .na \fB\fBTD_OK\fR\fR .ad .RS 12n .rt The call completed successfully. .RE .sp .ne 2 .mk .na \fB\fBTD_BADTH\fR\fR .ad .RS 12n .rt An invalid thread handle was passed in. .RE .sp .ne 2 .mk .na \fB\fBTD_DBERR\fR\fR .ad .RS 12n .rt A call to one of the imported interface routines failed. .RE .sp .ne 2 .mk .na \fB\fBTD_ERR\fR\fR .ad .RS 12n .rt A \fBlibc_db\fR internal error occurred. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for description of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ MT-LevelSafe .TE .SH SEE ALSO .sp .LP \fBlibc_db\fR(3LIB), \fBtd_thr_dbsuspend\fR(3C_DB), \fBtd_thr_get_info\fR(3C_DB), \fBattributes\fR(5)