system_data_types - Online Linux Manual PageSection : 7
Updated : 2023-02-05
Source : Linux man-pages 6.03
NAMEsystem_data_types − overview of system data types
DESCRIPTION sigevent Include: <signal.h>. Alternatively, <aio.h>, <mqueue.h>, or <time.h>. struct sigevent {
int sigev_notify; /* Notification type */
int sigev_signo; /* Signal number */
union sigval sigev_value; /* Signal value */
void (*sigev_notify_function)(union sigval);
/* Notification function */
pthread_attr_t *sigev_notify_attributes;
/* Notification attributes */
};For further details about this type, see sigevent(7). Versions: <aio.h> and <time.h> define sigevent since POSIX.1-2008. Conforming to: POSIX.1-2001 and later. See also: timer_create(2), getaddrinfo_a(3), lio_listio(3), mq_notify(3) See also the aiocb structure in this page. siginfo_t Include: <signal.h>. Alternatively, <sys/wait.h>. typedef struct {
int si_signo; /* Signal number */
int si_code; /* Signal code */
pid_t si_pid; /* Sending process ID */
uid_t si_uid; /* Real user ID of sending process */
void *si_addr; /* Address of faulting instruction */
int si_status; /* Exit value or signal */
union sigval si_value; /* Signal value */
} siginfo_t;Information associated with a signal. For further details on this structure (including additional, Linux-specific fields), see sigaction(2). Conforming to: POSIX.1-2001 and later. See also: pidfd_send_signal(2), rt_sigqueueinfo(2), sigaction(2), sigwaitinfo(2), psiginfo(3) sigset_t Include: <signal.h>. Alternatively, <spawn.h>, or <sys/select.h>. This is a type that represents a set of signals. According to POSIX, this shall be an integer or structure type. Conforming to: POSIX.1-2001 and later. See also: epoll_pwait(2), ppoll(2), pselect(2), sigaction(2), signalfd(2), sigpending(2), sigprocmask(2), sigsuspend(2), sigwaitinfo(2), signal(7) sigval Include: <signal.h>. union sigval {
int sigval_int; /* Integer value */
void *sigval_ptr; /* Pointer value */
};Data passed with a signal. Conforming to: POSIX.1-2001 and later. See also: pthread_sigqueue(3), sigqueue(3), sigevent(7) See also the sigevent structure and the siginfo_t type in this page.
NOTESThe structures described in this manual page shall contain, at least, the members shown in their definition, in no particular order. Most of the integer types described in this page don't have a corresponding length modifier for the printf(3) and the scanf(3) families of functions. To print a value of an integer type that doesn't have a length modifier, it should be converted to intmax_t or uintmax_t by an explicit cast. To scan into a variable of an integer type that doesn't have a length modifier, an intermediate temporary variable of type intmax_t or uintmax_t should be used. When copying from the temporary variable to the destination variable, the value could overflow. If the type has upper and lower limits, the user should check that the value is within those limits, before actually copying the value. The example below shows how these conversions should be done.
Conventions used in this pageIn "Conforming to" we only concern ourselves with C99 and later and POSIX.1-2001 and later. Some types may be specified in earlier versions of one of these standards, but in the interests of simplicity we omit details from earlier standards. In "Include", we first note the "primary" header(s) that define the type according to either the C or POSIX.1 standards. Under "Alternatively", we note additional headers that the standards specify shall define the type.
EXAMPLESThe program shown below scans from a string and prints a value stored in a variable of an integer type that doesn't have a length modifier. The appropriate conversions from and to intmax_t, and the appropriate range checks, are used as explained in the notes section above. #include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
int
main (void)
{
static const char *const str = "500000 us in half a second";
suseconds_t us;
intmax_t tmp;
/* Scan the number from the string into the temporary variable. */
sscanf(str, "%jd", &tmp);
/* Check that the value is within the valid range of suseconds_t. */
if (tmp < −1 || tmp > 1000000) {
fprintf(stderr, "Scanned value outside valid range!\n");
exit(EXIT_FAILURE);
}
/* Copy the value to the suseconds_t variable 'us'. */
us = tmp;
/* Even though suseconds_t can hold the value −1, this isn't
a sensible number of microseconds. */
if (us < 0) {
fprintf(stderr, "Scanned value shouldn't be negative!\n");
exit(EXIT_FAILURE);
}
/* Print the value. */
printf("There are %jd microseconds in half a second.\n",
(intmax_t) us);
exit(EXIT_SUCCESS);
}
SEE ALSOfeature_test_macros(7), standards(7) 0
Johanes Gumabo
Data Size : 19,571 byte
man-clock_t.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 6 / 199,306
Visitor ID : :
Visitor IP : 3.141.41.109 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.