<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fi">
	<id>https://www.linux.fi/w/index.php?action=history&amp;feed=atom&amp;title=Syscall%28%29</id>
	<title>Syscall() - Muutoshistoria</title>
	<link rel="self" type="application/atom+xml" href="https://www.linux.fi/w/index.php?action=history&amp;feed=atom&amp;title=Syscall%28%29"/>
	<link rel="alternate" type="text/html" href="https://www.linux.fi/w/index.php?title=Syscall()&amp;action=history"/>
	<updated>2026-04-13T15:58:29Z</updated>
	<subtitle>Tämän sivun muutoshistoria</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://www.linux.fi/w/index.php?title=Syscall()&amp;diff=57527&amp;oldid=prev</id>
		<title>Foliohattu: Katso myös</title>
		<link rel="alternate" type="text/html" href="https://www.linux.fi/w/index.php?title=Syscall()&amp;diff=57527&amp;oldid=prev"/>
		<updated>2022-05-12T15:18:00Z</updated>

		<summary type="html">&lt;p&gt;Katso myös&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fi&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Vanhempi versio&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versio 12. toukokuuta 2022 kello 18.18&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l43&quot;&gt;Rivi 43:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Rivi 43:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Katso myös==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [[C]]-kieli&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Luokka:C-standardikirjasto]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Luokka:C-standardikirjasto]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Foliohattu</name></author>
	</entry>
	<entry>
		<id>https://www.linux.fi/w/index.php?title=Syscall()&amp;diff=57526&amp;oldid=prev</id>
		<title>Foliohattu: lisätty luokka, ettei artikkeli jää täysin erilleen wikissä</title>
		<link rel="alternate" type="text/html" href="https://www.linux.fi/w/index.php?title=Syscall()&amp;diff=57526&amp;oldid=prev"/>
		<updated>2022-05-12T15:16:50Z</updated>

		<summary type="html">&lt;p&gt;lisätty luokka, ettei artikkeli jää täysin erilleen wikissä&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fi&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Vanhempi versio&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versio 12. toukokuuta 2022 kello 18.16&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l43&quot;&gt;Rivi 43:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Rivi 43:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Luokka:C-standardikirjasto]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Foliohattu</name></author>
	</entry>
	<entry>
		<id>https://www.linux.fi/w/index.php?title=Syscall()&amp;diff=57523&amp;oldid=prev</id>
		<title>NasmHerra: Ensimmäinen artikkelini - virheet todennäköisiä</title>
		<link rel="alternate" type="text/html" href="https://www.linux.fi/w/index.php?title=Syscall()&amp;diff=57523&amp;oldid=prev"/>
		<updated>2022-05-10T16:17:52Z</updated>

		<summary type="html">&lt;p&gt;Ensimmäinen artikkelini - virheet todennäköisiä&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Uusi sivu&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Syscall&amp;#039;&amp;#039;&amp;#039; on [[C-standardikirjasto]]n tarjoama funktio, jolla pystyy kutsumaan [[järjestelmäkutsu]]n. Funktio löytyy [[unistd.h]]-otsaketiedostosta. Syscall-funktio on määritelty seuraavasti:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
long syscall(long number, ...);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Määritelmän mukaan syscall-funktio vaatii vähintään yhden argumentin eli kutsuttavan järjestelmäkutsun numeron sekä järjestelmäkutsusta riippuen mahdollisesti tietyn määrän tietyn tyyppisiä argumentteja.&lt;br /&gt;
Järjestelmäkutsun kutsumisen lisäksi funktio asettaa tarvittaessa [[errno]]-muuttujan tietyn arvon.&lt;br /&gt;
&lt;br /&gt;
== Funktion luominen ==&lt;br /&gt;
Mikäli haluat tehdä oman [[C-kirjasto]]n, voit luoda oman syscall-funktion. Mikäli oletetaan, että saatavilla on vain kolme järjestelmäkutsua: &amp;#039;&amp;#039;open&amp;#039;&amp;#039; (0) , &amp;#039;&amp;#039;read&amp;#039;&amp;#039; (1) ja &amp;#039;&amp;#039;write&amp;#039;&amp;#039; (2), voidaan funktio yksinkertaisimmillaan ohjelmoida [[NASM]]-kielellä näin:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;asm&amp;quot;&amp;gt;&lt;br /&gt;
[BITS 64]&lt;br /&gt;
&lt;br /&gt;
global syscall&lt;br /&gt;
extern ENOSYS&lt;br /&gt;
extern ERRNO&lt;br /&gt;
&lt;br /&gt;
section .text&lt;br /&gt;
&lt;br /&gt;
syscall:&lt;br /&gt;
    cmp rax, NSYSCALLS&lt;br /&gt;
    ja nosyscall&lt;br /&gt;
    syscall&lt;br /&gt;
    cmp rax, 0&lt;br /&gt;
    push rax&lt;br /&gt;
    push rcx&lt;br /&gt;
    jb set_errno&lt;br /&gt;
    pop rcx&lt;br /&gt;
    pop rax&lt;br /&gt;
    ret&lt;br /&gt;
&lt;br /&gt;
nosyscall:&lt;br /&gt;
    mov rax, ENOSYS&lt;br /&gt;
&lt;br /&gt;
set_errno:&lt;br /&gt;
    mov rcx, rax&lt;br /&gt;
    sub rax, rcx&lt;br /&gt;
    sub rax, rcx&lt;br /&gt;
    mov errno, rax&lt;br /&gt;
&lt;br /&gt;
section .data&lt;br /&gt;
&lt;br /&gt;
NSYSCALLS: resb 2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>NasmHerra</name></author>
	</entry>
</feed>