-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'docs-6.3-2' of git://git.lwn.net/linux
Pull Documentation stragglers from Jonathan Corbet: "A handful of documentation patches that were ready before the merge window, but which I didn't get merged for the first round: - A recommendation from Thorsten (also akpm) on use of Link tags to point out problem reports - Some front-page formatting tweaks - Another Spanish translation - One typo(ish) fix" * tag 'docs-6.3-2' of git://git.lwn.net/linux: docs: recommend using Link: whenever using Reported-by: Documentation: front page: use recommended heading adornments docs/sp_SP: Add process programming-language translation docs: locking: refer to the actual existing config names
- Loading branch information
Showing
6 changed files
with
72 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ | |
kernel-enforcement-statement | ||
email-clients | ||
magic-number | ||
programming-language |
53 changes: 53 additions & 0 deletions
53
Documentation/translations/sp_SP/process/programming-language.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
.. include:: ../disclaimer-sp.rst | ||
|
||
:Original: :ref:`Documentation/process/programming-language.rst <programming_language>` | ||
:Translator: Carlos Bilbao <carlos.bilbao@amd.com> | ||
|
||
.. _sp_programming_language: | ||
|
||
Lenguaje de programación | ||
======================== | ||
|
||
El kernel está escrito en el lenguaje de programación C [sp-c-language]_. | ||
Más concretamente, el kernel normalmente se compila con ``gcc`` [sp-gcc]_ | ||
bajo ``-std=gnu11`` [sp-gcc-c-dialect-options]_: el dialecto GNU de ISO C11. | ||
``clang`` [sp-clang]_ también es compatible, consulte los documentos en | ||
:ref:`Building Linux with Clang/LLVM <kbuild_llvm>`. | ||
|
||
Este dialecto contiene muchas extensiones del lenguaje [sp-gnu-extensions]_, | ||
y muchos de ellos se usan dentro del kernel de forma habitual. | ||
|
||
Hay algo de soporte para compilar el núcleo con ``icc`` [sp-icc]_ para varias | ||
de las arquitecturas, aunque en el momento de escribir este texto, eso no | ||
está terminado y requiere parches de terceros. | ||
|
||
Atributos | ||
--------- | ||
|
||
Una de las comunes extensiones utilizadas en todo el kernel son los atributos | ||
[sp-gcc-attribute-syntax]_. Los atributos permiten introducir semántica | ||
definida por la implementación a las entidades del lenguaje (como variables, | ||
funciones o tipos) sin tener que hacer cambios sintácticos significativos | ||
al idioma (por ejemplo, agregar una nueva palabra clave) [sp-n2049]_. | ||
|
||
En algunos casos, los atributos son opcionales (es decir, hay compiladores | ||
que no los admiten pero de todos modos deben producir el código adecuado, | ||
incluso si es más lento o no realiza tantas comprobaciones/diagnósticos en | ||
tiempo de compilación). | ||
|
||
El kernel define pseudo-palabras clave (por ejemplo, ``__pure``) en lugar | ||
de usar directamente la sintaxis del atributo GNU (por ejemplo, | ||
``__attribute__((__pure__))``) con el fin de detectar cuáles se pueden | ||
utilizar y/o acortar el código. | ||
|
||
Por favor consulte ``include/linux/compiler_attributes.h`` para obtener | ||
más información. | ||
|
||
.. [sp-c-language] http://www.open-std.org/jtc1/sc22/wg14/www/standards | ||
.. [sp-gcc] https://gcc.gnu.org | ||
.. [sp-clang] https://clang.llvm.org | ||
.. [sp-icc] https://software.intel.com/en-us/c-compilers | ||
.. [sp-gcc-c-dialect-options] https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html | ||
.. [sp-gnu-extensions] https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html | ||
.. [sp-gcc-attribute-syntax] https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html | ||
.. [sp-n2049] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2049.pdf |