2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ATTRIBUTES 5 "Jul 29, 2007"
8 attributes, architecture, availability, CSI, stability, MT-Level, standard \-
9 attributes of interfaces
12 The \fBATTRIBUTES\fR section of a manual page contains a table defining
13 attribute types and their corresponding values. The following is an example of
14 an attributes table. Not all attribute types are appropriate for all types of
23 ATTRIBUTE TYPE ATTRIBUTE VALUE
29 Interface Stability Committed
33 Standard See \fBstandards\fR(5).
38 Architecture defines processor or specific hardware. See \fB-p\fR option of
39 \fBuname\fR(1). In some cases, it may indicate required adapters or
41 .SS "Code Set Independence (CSI)"
43 \fBOS\fR utilities and libraries free of dependencies on the properties of any
44 code sets are said to have Code Set Independence (CSI). They have the attribute
45 of being \fBCSI\fR enabled. This is in contrast to many commands and utilities,
46 for example, that work only with Extended Unix Codesets (EUC), an encoding
47 method that allows concurrent support for up to four code sets and is commonly
48 used to represent Asian character sets.
51 For practical reasons, however, this independence is not absolute. Certain
52 assumptions are still applied to the current \fBCSI\fR implementation:
57 File code is a superset of \fBASCII\fR.
63 To support multi-byte characters and null-terminated \fBUNIX\fR file names,
64 the \fINULL\fR and \fB/\fR (slash) characters cannot be part of any multi-byte
71 Only "stateless" file code encodings are supported. Stateless encoding avoids
72 shift, locking shift, designation, invocation, and so forth, although single
73 shift is not excluded.
79 Process code (\fBwchar_t\fR values) is implementation dependent and can change
80 over time or between implementations or between locales.
86 Not every object can have names composed of arbitrary characters. The names of
87 the following objects must be composed of \fBASCII\fR characters:
92 User names, group name, and passwords
104 Names of printers and special devices
110 Names of terminals (/\fBdev/tty*\fR)
116 Process \fBID\fR numbers
122 Message queues, semaphores, and shared memory labels.
128 The following may be composed of \fBISO\fR Latin-1 or \fBEUC\fR characters:
151 Shell variables and environmental variable names
157 Mount points for file systems
163 \fBNIS\fR key names and domain names
171 The names of \fBNFS\fR shared files should be composed of \fBASCII\fR
172 characters. Although files and directories may have names and contents composed
173 of characters from non-\fBASCII\fR code sets, using only the \fBASCII\fR
174 codeset allows \fBNFS\fR mounting across any machine, regardless of
175 localization. For the commands and utilities that are \fBCSI\fR enabled, all
176 can handle single-byte and multi-byte locales released in 2.6. For applications
177 to get full support of internationalization services, dynamic binding has to be
178 applied. Statically bound programs will only get support for C and POSIX
181 .SS "Interface Stability"
183 Sun often provides developers with early access to new technologies, which
184 allows developers to evaluate with them as soon as possible. Unfortunately, new
185 technologies are prone to changes and standardization often results in
186 interface incompatibility from previous versions.
189 To make reasonable risk assessments, developers need to know how likely an
190 interface is to change in future releases. To aid developers in making these
191 assessments, interface stability information is included on some manual pages
192 for commands, entry-points, and file formats.
195 The more stable interfaces can safely be used by nearly all applications,
196 because Sun will endeavor to ensure that these continue to work in future minor
197 releases. Applications that depend only on Committed interfaces should reliably
198 continue to function correctly on future minor releases (but not necessarily on
199 earlier major releases).
202 The less stable interfaces allow experimentation and prototyping, but should be
203 used only with the understanding that they might change incompatibly or even be
204 dropped or replaced with alternatives in future minor releases.
207 "Interfaces" that Sun does not document (for example, most kernel data
208 structures and some symbols in system header files) may be implementation
209 artifacts. Such internal interfaces are not only subject to incompatible change
210 or removal, but we are unlikely to mention such a change in release notes.
213 Products are given release levels, as well as names, to aid compatibility
214 discussions. Each release level may also include changes suitable for lower
222 Release Version Significance
225 Likely to contain major feature additions; adhere to different, possibly incompatible standard revisions; and though unlikely, could change, drop, or replace Committed interfaces. Initial product releases are usually 1.0.
229 Compared to an x.0 or earlier release (y!=0), it is likely to contain: feature additions, compatible changes to Committed interfaces, or likely incompatible changes to Uncommitted or Volatile interfaces.
233 Intended to be interface compatible with the previous release (z!=0), but likely to add bug fixes, performance enhancements, and support for additional hardware. Incompatible changes to Volatile interfaces are possible.
239 In the context of interface stability, update releases (occasionally referred
240 to as patch releases) should be considered equivalent to Micro Releases.
241 .SS "Classifications"
243 The following table summarizes how stability level classifications relate to
244 release level. The first column lists the Stability Level. The second column
245 lists the Release Level for Incompatible Changes, and the third column lists
246 other comments. For a complete discussion of individual classifications, see
247 the appropriate subsection below.
254 Stability Release Comments
256 Committed Major (x.0) Incompatibilities are exceptional.
258 Uncommitted Minor (x.y) Incompatibilities are common.
260 Volatile Micro (x.y.z) Incompatibilities are common.
265 The interface stability level classifications described on this manual page
266 apply to both source and binary interfaces unless otherwise stated. All
267 stability level classifications are public, with the exception of the
268 \fBPrivate\fR classification. The precise stability level of a public interface
269 (one that is documented in the manual pages) is unspecified unless explicitly
270 stated. The stability level of an undocumented interface is implicitly
274 The existence of documentation other than the documentation that is a component
275 of the Solaris product should not be construed to imply any level of stability
276 for interfaces provided by the Solaris product. The only source of stability
277 level information is Solaris manual pages.
281 \fB\fBCommitted\fR\fR
285 The intention of a Committed interface is to enable third parties to develop
286 applications to these interfaces, release them, and have confidence that they
287 will run on all releases of the product after the one in which the interface
288 was introduced, and within the same Major release. Even at a Major release,
289 incompatible changes are expected to be rare, and to have strong
292 Interfaces defined and controlled as industry standards are most often treated
293 as Committed interfaces. In this case, the controlling body and/or public,
294 versioned document is typically noted in a "Standard" entry in the Attributes
295 table or elsewhere in the documentation.
297 Although a truly exceptional event, incompatible changes are possible in any
298 release if the associated defect is serious enough as outlined in the
299 Exceptions section of this document or in a Minor release by following the End
300 of Feature process. If support of a Committed interface must be discontinued,
301 Sun will attempt to provide notification and the stability level will be marked
308 \fB\fBUncommitted\fR\fR
312 No commitment is made about either source or binary compatibility of these
313 interfaces from one Minor release to the next. Even the drastic incompatible
314 change of removal of the interface in a Minor release is possible. Uncommitted
315 interfaces are generally not appropriate for use by release-independent
318 Incompatible changes to the interface are intended to be motivated by true
319 improvement to the interface which may include ease of use considerations. The
320 general expectation should be that Uncommitted interfaces are not likely to
321 change incompatibly and if such changes occur they will be small in impact and
322 may often have a mitigation plan.
324 Uncommitted interfaces generally fall into one of the following subcategories:
328 Interfaces that are experimental or transitional. They are typically used to
329 give outside developers early access to new or rapidly changing technology, or
330 to provide an interim solution to a problem where a more general solution is
336 Interfaces whose specification is controlled by an outside body yet Sun
337 expects to make a reasonable effort to maintain compatibility with previous
338 releases until the next Minor release at which time Sun expects to synchronize
339 with the external specification.
344 Interfaces whose target audience values innovation (and possibly ease of
345 use) over stability. This attribute is often associated with administrative
346 interfaces for higher tier components.
348 For Uncommitted interfaces, Sun makes no claims about either source or binary
349 compatibility from one minor release to another. Applications developed based
350 on these interfaces may not work in future minor releases.
360 Volatile interfaces can change at any time and for any reason.
362 The Volatile interface stability level allows Sun products to quickly track a
363 fluid, rapidly evolving specification. In many cases, this is preferred to
364 providing additional stability to the interface, as it may better meet the
365 expectations of the consumer.
367 The most common application of this taxonomy level is to interfaces that are
368 controlled by a body other than Sun, but unlike specifications controlled by
369 standards bodies or Free or Open Source Software (FOSS) communities which value
370 interface compatibility, it can not be asserted that an incompatible change to
371 the interface specification would be exceedingly rare. It may also be applied
372 to FOSS controlled software where it is deemed more important to track the
373 community with minimal latency than to provide stability to our customers.
375 It also common to apply the Volatile classification level to interfaces in the
376 process of being defined by trusted or widely accepted organization. These are
377 generically referred to as draft standards. An "IETF Internet draft" is a well
378 understood example of a specification under development.
380 Volatile can also be applied to experimental interfaces.
382 No assertion is made regarding either source or binary compatibility of
383 Volatile interfaces between any two releases, including patches. Applications
384 containing these interfaces might fail to function properly in any future
391 \fB\fBNot-an-Interface\fR\fR
395 The situation occasionally occurs where there exists an entity that could be
396 inferred to be an interface, but actually is not. Common examples are output
397 from CLIs intended only for human consumption and the exact layout of a GUI.
399 This classification is a convenience term to be used to clarify such situations
400 where such confusion is identified as likely. Failure to apply this term to an
401 entity is not an indication that the entity is some form of interface. It only
402 indicates that the potential for confusion was not identified.
412 A Private interface is an interface provided by a component (or product)
413 intended only for the use of that component. A Private interface might still be
414 visible to or accessible by other components. Because the use of interfaces
415 private to another component carries great stability risks, such use is
416 explicitly not supported. Components not supplied by Sun Microsystems should
417 not use Private interfaces.
419 Most Private interfaces are not documented. It is an exceptional case when a
420 Private interface is documented. Reasons for documenting a Private interface
421 include, but are not limited to, the intention that the interface might be
422 reclassified to one of the public stability level classifications in the future
423 or the fact that the interface is inordinately visible.
433 Obsolete is a modifier that can appear in conjunction with the above
434 classification levels. The Obsolete modifier indicates an interface that is
435 "deprecated" and/or no longer advised for general use. An existing interface
436 may be downgraded from some other status (such as Committed or Uncommitted) by
437 the application of the Obsolete modifier to encourage customers to migrate from
438 that interface before it may be removed (or incompatibly changed).
440 An Obsolete interface is supported in the current release, but is scheduled to
441 be removed in a future (minor) release. When support of an interface is to be
442 discontinued, Sun will attempt to provide notification before discontinuing
443 support. Use of an Obsolete interface may produce warning messages.
448 There are rare instances when it is in the best interest of both Sun and the
449 customer to break the interface stability commitment. The following list
450 contains the common, known reasons for the interface provider to violate an
451 interface stability commitment, but does not preclude others.
455 Security holes where the vulnerability is inherent in the interface.
460 Data corruption where the vulnerability is inherent in the interface.
465 Standards violations uncovered by a change in interpretation or enhancement
466 of conformance tests.
471 An interface specification which isn't controlled by Sun has been changed
472 incompatibly and the vast majority of interface consumers expect the newer
478 Not making the incompatible change would be incomprehensible to our
479 customers. One example of this would to have not incompatibly changed pcfs
480 when the DOS 8.3 naming restrictions were abandoned.
484 Incompatible changes allowed by exception will always be delivered in the "most
485 major" release vehicle possible. However, often the consequences of the
486 vulnerabilities or contractual branding requirements will force delivery in a
488 .SS "Compatibility with Earlier Interface Classification Schemes"
490 In releases up to and including Solaris 10, a different interface
491 classification scheme was used. The following table summarizes the mapping
492 between the old and new classification schemes.
501 Standard Committed T{
502 An entry in the attributes table for the Standard attribute type should appear.
504 Stable Committed Name change.
505 Evolving Uncommitted Actual commitments match.
506 Unstable Uncommitted Name change.
508 Name change with expansion of allowed usage.
510 Obsolete (Obsolete) Was a classification, now a modifier.
515 The increased importance of Free or Open Source Software motivated the name
516 change from Stable/Unstable to Committed/Uncommitted. Stable conflicted with
517 the common use of the term in FOSS communities.
520 Ambiguity in the definition of Evolving was causing difficulty in
521 interpretation. As part of the migration to the new classification scheme, many
522 formerly Evolving interfaces were upgraded to Committed. However, upon
523 encountering the term Evolving, Uncommitted should be inferred.
526 Libraries are classified into categories that define their ability to support
527 multiple threads. Manual pages containing functions that are of multiple or
528 differing levels describe this in their \fBNOTES\fR or \fBUSAGE\fR section.
536 Safe is an attribute of code that can be called from a multithreaded
537 application. The effect of calling into a Safe interface or a safe code segment
538 is that the results are valid even when called by multiple threads. Often
539 overlooked is the fact that the result of this Safe interface or safe code
540 segment can have global consequences that affect all threads. For example, the
541 action of opening or closing a file from one thread is visible by all the
542 threads within a process. A multithreaded application has the responsibility
543 for using these interfaces in a safe manner, which is different from whether or
544 not the interface is Safe. For example, a multithreaded application that closes
545 a file that is still in use by other threads within the application is not
546 using the \fBclose\fR(2) interface safely.
556 An Unsafe library contains global and static data that is not protected. It is
557 not safe to use unless the application arranges for only one thread at time to
558 execute within the library. Unsafe libraries might contain functions that are
559 Safe; however, most of the library's functions are unsafe to call. Some
560 functions that are Unsafe have reentrant counterparts that are MT-Safe.
561 Reentrant functions are designated by the \fB_r\fR suffix appended to the
572 An MT-Safe library is fully prepared for multithreaded access. It protects its
573 global and static data with locks, and can provide a reasonable amount of
574 concurrency. A library can be safe to use, but not MT-Safe. For example,
575 surrounding an entire library with a monitor makes the library Safe, but it
576 supports no concurrency so it is not considered MT-Safe. An MT-Safe library
577 must permit a reasonable amount of concurrency. (This definition's purpose is
578 to give precision to what is meant when a library is described as Safe. The
579 definition of a Safe library does not specify if the library supports
580 concurrency. The MT-Safe definition makes it clear that the library is Safe,
581 and supports some concurrency. This clarifies the Safe definition, which can
582 mean anything from being single threaded to being any degree of multithreaded.)
588 \fB\fBAsync-Signal-Safe\fR\fR
592 Async-Signal-Safe refers to particular library functions that can be safely
593 called from a signal handler. A thread that is executing an Async-Signal-Safe
594 function will not deadlock with itself if interrupted by a signal. Signals are
595 only a problem for MT-Safe functions that acquire locks.
597 Async-Signal-Safe functions are also MT-Safe. Signals are disabled when locks
598 are acquired in Async-Signal-Safe functions. These signals prevent a signal
599 handler that might acquire the same lock from being called.
605 \fB\fBMT-Safe with Exceptions\fR\fR
609 See the \fBNOTES\fR or \fBUSAGE\fR sections of these pages for a description of
616 \fB\fBSafe with Exceptions\fR\fR
620 See the \fBNOTES\fR or \fBUSAGE\fR sections of these pages for a description of
627 \fB\fBFork-Safe\fR\fR
631 The \fBfork\fR(2) function replicates only the calling thread in the child
632 process. The \fBfork1\fR(2) function exists for compatibility with the past and
633 is synonymous with \fBfork()\fR. If a thread other than the one performing the
634 fork holds a lock when \fBfork()\fR is called, the lock will still be held in
635 the child process but there will be no lock owner since the owning thread was
636 not replicated. A child calling a function that attempts to acquire the lock
637 will deadlock itself.
639 When \fBfork()\fR is called, a Fork-Safe library arranges to have all of its
640 internal locks held only by the thread performing the fork. This is usually
641 accomplished with \fBpthread_atfork\fR(3C), which is called when the library is
644 The \fBforkall\fR(2) function provides the capability for the rare case when a
645 process needs to replicate all of its threads when performing a fork. No
646 \fBpthread_atfork()\fR actions are performed when \fBforkall()\fR is called.
647 There are dangers associated with calling \fBforkall()\fR. If some threads in a
648 process are performing I/O operations when another thread calls
649 \fBforkall()\fR, they will continue performing the same I/O operations in both
650 the parent and child processes, possibly causing data corruption. For this and
651 other race-condition reasons, the use of \fBforkall()\fR is discouraged.
653 In all Solaris releases prior to Solaris 10, the behavior of \fBfork()\fR
654 depended on whether or not the application was linked with \fB-lpthread\fR
655 (POSIX threads, see \fBstandards\fR(5)). If linked with \fB-lpthread\fR,
656 \fBfork()\fR behaved like \fBfork1()\fR; otherwise it behaved like
657 \fBforkall()\fR. To avoid any confusion concerning the behavior of
658 \fBfork()\fR, applications can specifically call \fBfork1()\fR or
659 \fBforkall()\fR as appropriate.
665 \fB\fBCancel-Safety\fR\fR
669 If a multithreaded application uses \fBpthread_cancel\fR(3C) to cancel (that
670 is, kill) a thread, it is possible that the target thread is killed while
671 holding a resource, such as a lock or allocated memory. If the thread has not
672 installed the appropriate cancellation cleanup handlers to release the
673 resources appropriately (see \fBpthread_cancel\fR(3C)), the application is
674 "cancel-unsafe", that is, it is not safe with respect to cancellation. This
675 unsafety could result in deadlocks due to locks not released by a thread that
676 gets cancelled, or resource leaks; for example, memory not being freed on
677 thread cancellation. All applications that use \fBpthread_cancel\fR(3C) should
678 ensure that they operate in a Cancel-Safe environment. Libraries that have
679 cancellation points and which acquire resources such as locks or allocate
680 memory dynamically, also contribute to the cancel-unsafety of applications that
681 are linked with these libraries. This introduces another level of safety for
682 libraries in a multithreaded program: Cancel-Safety. There are two
683 sub-categories of Cancel-Safety: Deferred-Cancel-Safety, and
684 Asynchronous-Cancel-Safety. An application is considered to be
685 Deferred-Cancel-Safe when it is Cancel-Safe for threads whose cancellation type
686 is \fBPTHREAD_CANCEL_DEFERRED\fR. An application is considered to be
687 Asynchronous-Cancel-Safe when it is Cancel-Safe for threads whose cancellation
688 type is \fBPTHREAD_CANCEL_ASYNCHRONOUS\fR. Deferred-Cancel-Safety is easier to
689 achieve than Asynchronous-Cancel-Safety, since a thread with the deferred
690 cancellation type can be cancelled only at well-defined cancellation points,
691 whereas a thread with the asynchronous cancellation type can be cancelled
692 anywhere. Since all threads are created by default to have the deferred
693 cancellation type, it might never be necessary to worry about asynchronous
694 cancel safety. Most applications and libraries are expected to always be
695 Asynchronous-Cancel-Unsafe. An application which is Asynchronous-Cancel-Safe is
696 also, by definition, Deferred-Cancel-Safe.
701 Many interfaces are defined and controlled as industry standards. When this is
702 the case, the controlling body and/or public, versioned document is noted in
706 Programmers producing portable applications should rely on the interface
707 descriptions present in the standard or specification to which the application
708 is intended to conform, rather than the manual page descriptions of interfaces
709 based upon a public standard. When the standard or specification allows
710 alternative implementation choices, the manual page usually only describes the
711 alternative implemented by Sun. The manual page also describes any compatible
712 extensions to the base definition of Standard interfaces provided by Sun.
715 No endorsement of the referenced controlling body or document should be
716 inferred by its presence as a "Standard" entry. The controlling body may be a
717 very formal organization, as in ISO or ANSII, a less formal, but generally
718 accepted organization such as IETF, or as informal as the sole contributor in
719 the case of FOSS (Free or Open Source Software).
722 \fBuname\fR(1), \fBpkgadd\fR(1M), \fBIntro\fR(3), \fBstandards\fR(5)