<?xml version='1.0' encoding='UTF-8' standalone='no'?> <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.16"> <compounddef id="spinlock_8h" kind="file" language="C++"> <compoundname>spinlock.h</compoundname> <includes refid="include_2sys_2types_8h" local="no">sys/types.h</includes> <includedby refid="armv6_2sched_8c" local="no">C:/Dev/git/UbixOS/sys/arch/armv6/sched.c</includedby> <includedby refid="armv6_2spinlock_8c" local="no">C:/Dev/git/UbixOS/sys/arch/armv6/spinlock.c</includedby> <includedby refid="i386_2sched_8c" local="no">C:/Dev/git/UbixOS/sys/arch/i386/sched.c</includedby> <includedby refid="i386_2spinlock_8c" local="no">C:/Dev/git/UbixOS/sys/arch/i386/spinlock.c</includedby> <includedby refid="devfs_8c" local="no">C:/Dev/git/UbixOS/sys/fs/devfs/devfs.c</includedby> <includedby refid="dirCache_8c" local="no">C:/Dev/git/UbixOS/sys/fs/ubixfs/dirCache.c</includedby> <includedby refid="file_8c" local="no">C:/Dev/git/UbixOS/sys/fs/vfs/file.c</includedby> <includedby refid="vitals_8h" local="no">C:/Dev/git/UbixOS/sys/include/ubixos/vitals.h</includedby> <includedby refid="atkbd_8c" local="no">C:/Dev/git/UbixOS/sys/isa/atkbd.c</includedby> <includedby refid="fdc_8c" local="no">C:/Dev/git/UbixOS/sys/isa/fdc.c</includedby> <includedby refid="ne2k_8c" local="no">C:/Dev/git/UbixOS/sys/isa/ne2k.c</includedby> <includedby refid="smp_8c" local="no">C:/Dev/git/UbixOS/sys/kernel/smp.c</includedby> <includedby refid="kernel_2syscall_8c" local="no">C:/Dev/git/UbixOS/sys/kernel/syscall.c</includedby> <includedby refid="syscall__posix_8c" local="no">C:/Dev/git/UbixOS/sys/kernel/syscall_posix.c</includedby> <includedby refid="tty_8c" local="no">C:/Dev/git/UbixOS/sys/kernel/tty.c</includedby> <includedby refid="ubthread_8c" local="no">C:/Dev/git/UbixOS/sys/kernel/ubthread.c</includedby> <includedby refid="kmod_8c" local="no">C:/Dev/git/UbixOS/sys/kmods/kmod.c</includedby> <includedby refid="kmalloc_8c" local="no">C:/Dev/git/UbixOS/sys/lib/kmalloc.c</includedby> <includedby refid="system_8c" local="no">C:/Dev/git/UbixOS/sys/mpi/system.c</includedby> <includedby refid="sys__arch_8c" local="no">C:/Dev/git/UbixOS/sys/net/net/sys_arch.c</includedby> <includedby refid="lnc_8c" local="no">C:/Dev/git/UbixOS/sys/pci/lnc.c</includedby> <includedby refid="device_8c" local="no">C:/Dev/git/UbixOS/sys/sys/device.c</includedby> <includedby refid="video_8c" local="no">C:/Dev/git/UbixOS/sys/sys/video.c</includedby> <includedby refid="copyvirtualspace_8c" local="no">C:/Dev/git/UbixOS/sys/vmm/copyvirtualspace.c</includedby> <includedby refid="getfreepage_8c" local="no">C:/Dev/git/UbixOS/sys/vmm/getfreepage.c</includedby> <includedby refid="getfreevirtualpage_8c" local="no">C:/Dev/git/UbixOS/sys/vmm/getfreevirtualpage.c</includedby> <includedby refid="pagefault_8c" local="no">C:/Dev/git/UbixOS/sys/vmm/pagefault.c</includedby> <includedby refid="paging_8c" local="no">C:/Dev/git/UbixOS/sys/vmm/paging.c</includedby> <includedby refid="vmm__allocpagetable_8c" local="no">C:/Dev/git/UbixOS/sys/vmm/vmm_allocpagetable.c</includedby> <includedby refid="vmm__init_8c" local="no">C:/Dev/git/UbixOS/sys/vmm/vmm_init.c</includedby> <includedby refid="vmm__memory_8c" local="no">C:/Dev/git/UbixOS/sys/vmm/vmm_memory.c</includedby> <includedby refid="vmm__mmap_8c" local="no">C:/Dev/git/UbixOS/sys/vmm/vmm_mmap.c</includedby> <incdepgraph> <node id="4"> <label>sys/select.h</label> <link refid="select_8h"/> <childnode refid="5" relation="include"> </childnode> <childnode refid="3" relation="include"> </childnode> <childnode refid="6" relation="include"> </childnode> <childnode refid="7" relation="include"> </childnode> <childnode refid="8" relation="include"> </childnode> </node> <node id="1"> <label>C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h</label> <link refid="spinlock_8h"/> <childnode refid="2" relation="include"> </childnode> </node> <node id="8"> <label>sys/_sigset.h</label> <link refid="__sigset_8h"/> <childnode refid="3" relation="include"> </childnode> </node> <node id="2"> <label>sys/types.h</label> <link refid="include_2sys_2types_8h"/> <childnode refid="3" relation="include"> </childnode> <childnode refid="4" relation="include"> </childnode> </node> <node id="5"> <label>sys/cdefs.h</label> <link refid="cdefs_8h"/> </node> <node id="3"> <label>sys/_types.h</label> <link refid="__types_8h"/> </node> <node id="6"> <label>sys/_timespec.h</label> <link refid="__timespec_8h"/> <childnode refid="3" relation="include"> </childnode> </node> <node id="7"> <label>sys/_timeval.h</label> <link refid="__timeval_8h"/> <childnode refid="3" relation="include"> </childnode> </node> </incdepgraph> <invincdepgraph> <node id="26"> <label>C:/Dev/git/UbixOS/sys/lib/ogprintf.cc</label> <link refid="ogprintf_8cc"/> </node> <node id="46"> <label>C:/Dev/git/UbixOS/sys/vmm/pagefault.c</label> <link refid="pagefault_8c"/> </node> <node id="27"> <label>C:/Dev/git/UbixOS/sys/sde/colours.cc</label> <link refid="colours_8cc"/> </node> <node id="18"> <label>C:/Dev/git/UbixOS/sys/init/main.c</label> <link refid="main_8c"/> </node> <node id="37"> <label>C:/Dev/git/UbixOS/sys/lib/kmalloc.c</label> <link refid="kmalloc_8c"/> </node> <node id="7"> <label>C:/Dev/git/UbixOS/sys/fs/ubixfs/dirCache.c</label> <link refid="dirCache_8c"/> </node> <node id="10"> <label>C:/Dev/git/UbixOS/sys/arch/armv6/fork.c</label> <link refid="armv6_2fork_8c"/> </node> <node id="29"> <label>C:/Dev/git/UbixOS/sys/sde/sde.cc</label> <link refid="sde_8cc"/> </node> <node id="28"> <label>C:/Dev/git/UbixOS/sys/sde/main.cc</label> <link refid="main_8cc"/> </node> <node id="19"> <label>C:/Dev/git/UbixOS/sys/isa/atkbd.c</label> <link refid="atkbd_8c"/> </node> <node id="8"> <label>C:/Dev/git/UbixOS/sys/fs/vfs/file.c</label> <link refid="file_8c"/> </node> <node id="4"> <label>C:/Dev/git/UbixOS/sys/arch/i386/sched.c</label> <link refid="i386_2sched_8c"/> </node> <node id="3"> <label>C:/Dev/git/UbixOS/sys/arch/armv6/spinlock.c</label> <link refid="armv6_2spinlock_8c"/> </node> <node id="47"> <label>C:/Dev/git/UbixOS/sys/vmm/vmm_allocpagetable.c</label> <link refid="vmm__allocpagetable_8c"/> </node> <node id="5"> <label>C:/Dev/git/UbixOS/sys/arch/i386/spinlock.c</label> <link refid="i386_2spinlock_8c"/> </node> <node id="39"> <label>C:/Dev/git/UbixOS/sys/net/net/sys_arch.c</label> <link refid="sys__arch_8c"/> </node> <node id="16"> <label>C:/Dev/git/UbixOS/sys/fs/vfs/vfs.c</label> <link refid="vfs_8c"/> </node> <node id="1"> <label>C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h</label> <link refid="spinlock_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="3" relation="include"> </childnode> <childnode refid="4" relation="include"> </childnode> <childnode refid="5" relation="include"> </childnode> <childnode refid="6" relation="include"> </childnode> <childnode refid="7" relation="include"> </childnode> <childnode refid="8" relation="include"> </childnode> <childnode refid="9" relation="include"> </childnode> <childnode refid="19" relation="include"> </childnode> <childnode refid="32" relation="include"> </childnode> <childnode refid="20" relation="include"> </childnode> <childnode refid="33" relation="include"> </childnode> <childnode refid="22" relation="include"> </childnode> <childnode refid="34" relation="include"> </childnode> <childnode refid="35" relation="include"> </childnode> <childnode refid="24" relation="include"> </childnode> <childnode refid="36" relation="include"> </childnode> <childnode refid="37" relation="include"> </childnode> <childnode refid="38" relation="include"> </childnode> <childnode refid="39" relation="include"> </childnode> <childnode refid="40" relation="include"> </childnode> <childnode refid="41" relation="include"> </childnode> <childnode refid="42" relation="include"> </childnode> <childnode refid="43" relation="include"> </childnode> <childnode refid="44" relation="include"> </childnode> <childnode refid="45" relation="include"> </childnode> <childnode refid="46" relation="include"> </childnode> <childnode refid="30" relation="include"> </childnode> <childnode refid="47" relation="include"> </childnode> <childnode refid="48" relation="include"> </childnode> <childnode refid="31" relation="include"> </childnode> <childnode refid="49" relation="include"> </childnode> </node> <node id="21"> <label>C:/Dev/git/UbixOS/sys/kernel/endtask.c</label> <link refid="endtask_8c"/> </node> <node id="40"> <label>C:/Dev/git/UbixOS/sys/pci/lnc.c</label> <link refid="lnc_8c"/> </node> <node id="35"> <label>C:/Dev/git/UbixOS/sys/kernel/tty.c</label> <link refid="tty_8c"/> </node> <node id="38"> <label>C:/Dev/git/UbixOS/sys/mpi/system.c</label> <link refid="system_8c"/> </node> <node id="36"> <label>C:/Dev/git/UbixOS/sys/kmods/kmod.c</label> <link refid="kmod_8c"/> </node> <node id="20"> <label>C:/Dev/git/UbixOS/sys/isa/ne2k.c</label> <link refid="ne2k_8c"/> </node> <node id="9"> <label>C:/Dev/git/UbixOS/sys/include/ubixos/vitals.h</label> <link refid="vitals_8h"/> <childnode refid="10" relation="include"> </childnode> <childnode refid="11" relation="include"> </childnode> <childnode refid="12" relation="include"> </childnode> <childnode refid="13" relation="include"> </childnode> <childnode refid="14" relation="include"> </childnode> <childnode refid="8" relation="include"> </childnode> <childnode refid="15" relation="include"> </childnode> <childnode refid="16" relation="include"> </childnode> <childnode refid="17" relation="include"> </childnode> <childnode refid="19" relation="include"> </childnode> <childnode refid="20" relation="include"> </childnode> <childnode refid="21" relation="include"> </childnode> <childnode refid="22" relation="include"> </childnode> <childnode refid="23" relation="include"> </childnode> <childnode refid="24" relation="include"> </childnode> <childnode refid="25" relation="include"> </childnode> <childnode refid="26" relation="include"> </childnode> <childnode refid="27" relation="include"> </childnode> <childnode refid="28" relation="include"> </childnode> <childnode refid="29" relation="include"> </childnode> <childnode refid="30" relation="include"> </childnode> <childnode refid="31" relation="include"> </childnode> </node> <node id="13"> <label>C:/Dev/git/UbixOS/sys/arch/i386/fork.c</label> <link refid="i386_2fork_8c"/> </node> <node id="49"> <label>C:/Dev/git/UbixOS/sys/vmm/vmm_mmap.c</label> <link refid="vmm__mmap_8c"/> </node> <node id="30"> <label>C:/Dev/git/UbixOS/sys/vmm/paging.c</label> <link refid="paging_8c"/> </node> <node id="42"> <label>C:/Dev/git/UbixOS/sys/sys/video.c</label> <link refid="video_8c"/> </node> <node id="43"> <label>C:/Dev/git/UbixOS/sys/vmm/copyvirtualspace.c</label> <link refid="copyvirtualspace_8c"/> </node> <node id="34"> <label>C:/Dev/git/UbixOS/sys/kernel/syscall_posix.c</label> <link refid="syscall__posix_8c"/> </node> <node id="14"> <label>C:/Dev/git/UbixOS/sys/arch/i386/systemtask.c</label> <link refid="i386_2systemtask_8c"/> </node> <node id="44"> <label>C:/Dev/git/UbixOS/sys/vmm/getfreepage.c</label> <link refid="getfreepage_8c"/> </node> <node id="32"> <label>C:/Dev/git/UbixOS/sys/isa/fdc.c</label> <link refid="fdc_8c"/> </node> <node id="45"> <label>C:/Dev/git/UbixOS/sys/vmm/getfreevirtualpage.c</label> <link refid="getfreevirtualpage_8c"/> </node> <node id="2"> <label>C:/Dev/git/UbixOS/sys/arch/armv6/sched.c</label> <link refid="armv6_2sched_8c"/> </node> <node id="6"> <label>C:/Dev/git/UbixOS/sys/fs/devfs/devfs.c</label> <link refid="devfs_8c"/> </node> <node id="31"> <label>C:/Dev/git/UbixOS/sys/vmm/vmm_memory.c</label> <link refid="vmm__memory_8c"/> </node> <node id="33"> <label>C:/Dev/git/UbixOS/sys/kernel/smp.c</label> <link refid="smp_8c"/> </node> <node id="22"> <label>C:/Dev/git/UbixOS/sys/kernel/syscall.c</label> <link refid="kernel_2syscall_8c"/> </node> <node id="12"> <label>C:/Dev/git/UbixOS/sys/arch/armv6/systemtask.c</label> <link refid="armv6_2systemtask_8c"/> </node> <node id="48"> <label>C:/Dev/git/UbixOS/sys/vmm/vmm_init.c</label> <link refid="vmm__init_8c"/> </node> <node id="11"> <label>C:/Dev/git/UbixOS/sys/arch/armv6/syscall.c</label> <link refid="arch_2armv6_2syscall_8c"/> </node> <node id="15"> <label>C:/Dev/git/UbixOS/sys/fs/vfs/mount.c</label> <link refid="mount_8c"/> </node> <node id="17"> <label>C:/Dev/git/UbixOS/sys/include/ubixos/init.h</label> <link refid="ubixos_2init_8h"/> <childnode refid="18" relation="include"> </childnode> </node> <node id="25"> <label>C:/Dev/git/UbixOS/sys/kernel/vitals.c</label> <link refid="vitals_8c"/> </node> <node id="41"> <label>C:/Dev/git/UbixOS/sys/sys/device.c</label> <link refid="device_8c"/> </node> <node id="24"> <label>C:/Dev/git/UbixOS/sys/kernel/ubthread.c</label> <link refid="ubthread_8c"/> </node> <node id="23"> <label>C:/Dev/git/UbixOS/sys/kernel/time.c</label> <link refid="time_8c"/> </node> </invincdepgraph> <innerclass refid="structspinLock" prot="public">spinLock</innerclass> <sectiondef kind="define"> <memberdef kind="define" id="spinlock_8h_1aef31df4fa10911959af449d9f3ccf78f" prot="public" static="no"> <name>LLOCK_FLAG</name> <initializer>1</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="37" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" bodystart="37" bodyend="-1"/> </memberdef> <memberdef kind="define" id="spinlock_8h_1a00de8f7e0b615f88335573ba3909583d" prot="public" static="no"> <name>LOCKED</name> <initializer>1</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="34" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" bodystart="34" bodyend="-1"/> </memberdef> <memberdef kind="define" id="spinlock_8h_1a0fe85a4f3642683148b25916d6c5eafd" prot="public" static="no"> <name>SPIN_LOCK_INITIALIZER</name> <initializer>{<ref refid="include_2sys_2types_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>, 0}</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="36" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" bodystart="36" bodyend="-1"/> </memberdef> <memberdef kind="define" id="spinlock_8h_1af0591d953a49374b660c9de8964825fe" prot="public" static="no"> <name>UNLOCKED</name> <initializer>0</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="35" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" bodystart="35" bodyend="-1"/> </memberdef> </sectiondef> <sectiondef kind="typedef"> <memberdef kind="typedef" id="spinlock_8h_1a205601d674593c0fff0a54719d27465b" prot="public" static="no"> <type>struct <ref refid="structspinLock" kindref="compound">spinLock</ref> *</type> <definition>typedef struct spinLock* spinLock_t</definition> <argsstring></argsstring> <name>spinLock_t</name> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="46" column="23" bodyfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" bodystart="46" bodyend="-1"/> </memberdef> </sectiondef> <sectiondef kind="var"> <memberdef kind="variable" id="spinlock_8h_1a265ad04ec8650ad0a46179cdaa01dd98" prot="public" static="no" mutable="no"> <type>struct <ref refid="structspinLock" kindref="compound">spinLock</ref></type> <definition>struct spinLock Master</definition> <argsstring></argsstring> <name>Master</name> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="46" column="23" bodyfile="C:/Dev/git/UbixOS/sys/kernel/syscall_posix.c" bodystart="40" bodyend="-1" declfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" declline="46" declcolumn="23"/> </memberdef> </sectiondef> <sectiondef kind="func"> <memberdef kind="function" id="spinlock_8h_1aba0887b6d52073603ad5a661d92379ce" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual"> <type>char</type> <definition>static char atomic_bitsetandtest</definition> <argsstring>(void *ptr, int x)</argsstring> <name>atomic_bitsetandtest</name> <param> <type>void *</type> <declname>ptr</declname> </param> <param> <type>int</type> <declname>x</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="85" column="20" bodyfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" bodystart="85" bodyend="94"/> </memberdef> <memberdef kind="function" id="spinlock_8h_1a623e97c04239abcce11cdd2826525f2e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>void spinLock</definition> <argsstring>(spinLock_t)</argsstring> <name>spinLock</name> <param> <type><ref refid="spinlock_8h_1a205601d674593c0fff0a54719d27465b" kindref="member">spinLock_t</ref></type> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="53" column="6" bodyfile="C:/Dev/git/UbixOS/sys/arch/i386/spinlock.c" bodystart="64" bodyend="71" declfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" declline="53" declcolumn="6"/> </memberdef> <memberdef kind="function" id="spinlock_8h_1a4a5b56fc59f6a63a4d6cfac573889789" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>void spinLock_scheduler</definition> <argsstring>(spinLock_t *)</argsstring> <name>spinLock_scheduler</name> <param> <type><ref refid="spinlock_8h_1a205601d674593c0fff0a54719d27465b" kindref="member">spinLock_t</ref> *</type> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="55" column="6" bodyfile="C:/Dev/git/UbixOS/sys/arch/armv6/spinlock.c" bodystart="63" bodyend="66" declfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" declline="55" declcolumn="6"/> <references refid="armv6_2spinlock_8c_1a740766af5da58616f700fffab6768a78" compoundref="armv6_2spinlock_8c" startline="47" endline="53">spinTryLock</references> </memberdef> <memberdef kind="function" id="spinlock_8h_1a3ed033ffdc33d480e77190d424149415" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>void spinLockInit</definition> <argsstring>(spinLock_t)</argsstring> <name>spinLockInit</name> <param> <type><ref refid="spinlock_8h_1a205601d674593c0fff0a54719d27465b" kindref="member">spinLock_t</ref></type> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="50" column="6" bodyfile="C:/Dev/git/UbixOS/sys/arch/i386/spinlock.c" bodystart="47" bodyend="49" declfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" declline="50" declcolumn="6"/> <references refid="string_8h_1ace4b911463887af5e748326323e99a23">memset</references> </memberdef> <memberdef kind="function" id="spinlock_8h_1acba75fe5ed894dc88030f7458b114a94" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>int</type> <definition>int spinLockLocked</definition> <argsstring>(spinLock_t *)</argsstring> <name>spinLockLocked</name> <param> <type><ref refid="spinlock_8h_1a205601d674593c0fff0a54719d27465b" kindref="member">spinLock_t</ref> *</type> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="57" column="5" bodyfile="C:/Dev/git/UbixOS/sys/arch/armv6/spinlock.c" bodystart="69" bodyend="71" declfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" declline="57" declcolumn="5"/> <referencedby refid="smp_8c_1ac7cb5b4b2fbc61966a6dfc8044a7b800" compoundref="smp_8c" startline="133" endline="154">c_ap_boot</referencedby> </memberdef> <memberdef kind="function" id="spinlock_8h_1aed6e978dc2762fbf062e37670b8fa04d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>int</type> <definition>int spinTryLock</definition> <argsstring>(spinLock_t)</argsstring> <name>spinTryLock</name> <param> <type><ref refid="spinlock_8h_1a205601d674593c0fff0a54719d27465b" kindref="member">spinLock_t</ref></type> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="52" column="5" bodyfile="C:/Dev/git/UbixOS/sys/arch/i386/spinlock.c" bodystart="51" bodyend="57" declfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" declline="52" declcolumn="5"/> <references refid="i386_2spinlock_8c_1a2ecfcce98539a0b972d6fa2586c4e67f" compoundref="i386_2spinlock_8c" startline="35">cmpxchg</references> <references refid="spinlock_8h_1aef31df4fa10911959af449d9f3ccf78f" compoundref="spinlock_8h" startline="37">LLOCK_FLAG</references> <references refid="spinlock_8h_1a00de8f7e0b615f88335573ba3909583d" compoundref="spinlock_8h" startline="34">LOCKED</references> <references refid="structspinLock_1a243edf7f3d81de2a9c7e3852768e5847" compoundref="spinlock_8h" startline="43">spinLock::locked</references> <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references> </memberdef> <memberdef kind="function" id="spinlock_8h_1a02e11882c06e98ee0e7ff1a9b4626fb3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>void spinUnlock</definition> <argsstring>(spinLock_t)</argsstring> <name>spinUnlock</name> <param> <type><ref refid="spinlock_8h_1a205601d674593c0fff0a54719d27465b" kindref="member">spinLock_t</ref></type> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="51" column="6" bodyfile="C:/Dev/git/UbixOS/sys/arch/i386/spinlock.c" bodystart="59" bodyend="62" declfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" declline="51" declcolumn="6"/> <references refid="i386_2spinlock_8c_1a53290ac2df2384738b8769c76622f803" compoundref="i386_2spinlock_8c" startline="42">barrier</references> <references refid="structspinLock_1a243edf7f3d81de2a9c7e3852768e5847" compoundref="spinlock_8h" startline="43">spinLock::locked</references> </memberdef> <memberdef kind="function" id="spinlock_8h_1a03d2bc6bf7f074fcb8f20c4da7213cb4" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual"> <type>unsigned short</type> <definition>static unsigned short xchg_16</definition> <argsstring>(volatile uint32_t *ptr, uint16_t x)</argsstring> <name>xchg_16</name> <param> <type><ref refid="cdefs_8h_1af55a5e48555be7d32ad73e76cf5d4db0" kindref="member">volatile</ref> <ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref> *</type> <declname>ptr</declname> </param> <param> <type><ref refid="include_2sys_2types_8h_1a281b4b5562236420969a830503b0ba19" kindref="member">uint16_t</ref></type> <declname>x</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="76" column="30" bodyfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" bodystart="76" bodyend="82"/> </memberdef> <memberdef kind="function" id="spinlock_8h_1a5356d393a21aed1838f34c5ccaae3ca2" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual"> <type>unsigned</type> <definition>static unsigned xchg_32</definition> <argsstring>(volatile uint32_t *ptr, uint32_t x)</argsstring> <name>xchg_32</name> <param> <type><ref refid="cdefs_8h_1af55a5e48555be7d32ad73e76cf5d4db0" kindref="member">volatile</ref> <ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref> *</type> <declname>ptr</declname> </param> <param> <type><ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref></type> <declname>x</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="68" column="24" bodyfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" bodystart="68" bodyend="74"/> </memberdef> <memberdef kind="function" id="spinlock_8h_1ab708e6f39bcc794217b7703deb901493" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual"> <type><ref refid="include_2sys_2types_8h_1a8f25a50daf29ce2cee1ec038a4d744ea" kindref="member">u_long</ref></type> <definition>static u_long xchg_64</definition> <argsstring>(volatile uint32_t *ptr, u_long x)</argsstring> <name>xchg_64</name> <param> <type><ref refid="cdefs_8h_1af55a5e48555be7d32ad73e76cf5d4db0" kindref="member">volatile</ref> <ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref> *</type> <declname>ptr</declname> </param> <param> <type><ref refid="include_2sys_2types_8h_1a8f25a50daf29ce2cee1ec038a4d744ea" kindref="member">u_long</ref></type> <declname>x</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" line="60" column="22" bodyfile="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h" bodystart="60" bodyend="66"/> </memberdef> </sectiondef> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <programlisting> <codeline lineno="1"><highlight class="comment">/*-</highlight></codeline> <codeline lineno="2"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2002-2018<sp/>The<sp/>UbixOS<sp/>Project.</highlight></codeline> <codeline lineno="3"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline> <codeline lineno="4"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="5"><highlight class="comment"><sp/>*<sp/>This<sp/>was<sp/>developed<sp/>by<sp/>Christopher<sp/>W.<sp/>Olsen<sp/>for<sp/>the<sp/>UbixOS<sp/>Project.</highlight></codeline> <codeline lineno="6"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="7"><highlight class="comment"><sp/>*<sp/>Redistribution<sp/>and<sp/>use<sp/>in<sp/>source<sp/>and<sp/>binary<sp/>forms,<sp/>with<sp/>or<sp/>without<sp/>modification,<sp/>are<sp/>permitted</highlight></codeline> <codeline lineno="8"><highlight class="comment"><sp/>*<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline> <codeline lineno="9"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="10"><highlight class="comment"><sp/>*<sp/>1)<sp/>Redistributions<sp/>of<sp/>source<sp/>code<sp/>must<sp/>retain<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline> <codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors.</highlight></codeline> <codeline lineno="12"><highlight class="comment"><sp/>*<sp/>2)<sp/>Redistributions<sp/>in<sp/>binary<sp/>form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline> <codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors<sp/>in<sp/>the<sp/>documentation<sp/>and/or</highlight></codeline> <codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>other<sp/>materials<sp/>provided<sp/>with<sp/>the<sp/>distribution.</highlight></codeline> <codeline lineno="15"><highlight class="comment"><sp/>*<sp/>3)<sp/>Neither<sp/>the<sp/>name<sp/>of<sp/>the<sp/>UbixOS<sp/>Project<sp/>nor<sp/>the<sp/>names<sp/>of<sp/>its<sp/>contributors<sp/>may<sp/>be<sp/>used<sp/>to</highlight></codeline> <codeline lineno="16"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>endorse<sp/>or<sp/>promote<sp/>products<sp/>derived<sp/>from<sp/>this<sp/>software<sp/>without<sp/>specific<sp/>prior<sp/>written</highlight></codeline> <codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>permission.</highlight></codeline> <codeline lineno="18"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="19"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>AND<sp/>CONTRIBUTORS<sp/>"AS<sp/>IS"<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline> <codeline lineno="20"><highlight class="comment"><sp/>*<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF<sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS</highlight></codeline> <codeline lineno="21"><highlight class="comment"><sp/>*<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>COPYRIGHT<sp/>OWNER<sp/>OR<sp/>CONTRIBUTORS</highlight></codeline> <codeline lineno="22"><highlight class="comment"><sp/>*<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,<sp/>SPECIAL,<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES</highlight></codeline> <codeline lineno="23"><highlight class="comment"><sp/>*<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT<sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,</highlight></codeline> <codeline lineno="24"><highlight class="comment"><sp/>*<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS<sp/>INTERRUPTION)<sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN</highlight></codeline> <codeline lineno="25"><highlight class="comment"><sp/>*<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT</highlight></codeline> <codeline lineno="26"><highlight class="comment"><sp/>*<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS<sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline> <codeline lineno="27"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="28"><highlight class="normal"></highlight></codeline> <codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>_UBIXOS_SPINLOCK_H</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>_UBIXOS_SPINLOCK_H</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="31"><highlight class="normal"></highlight></codeline> <codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="include_2sys_2types_8h" kindref="compound">sys/types.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="33"><highlight class="normal"></highlight></codeline> <codeline lineno="34" refid="spinlock_8h_1a00de8f7e0b615f88335573ba3909583d" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>LOCKED<sp/><sp/><sp/>1</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="35" refid="spinlock_8h_1af0591d953a49374b660c9de8964825fe" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>UNLOCKED<sp/>0</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="36" refid="spinlock_8h_1a0fe85a4f3642683148b25916d6c5eafd" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>SPIN_LOCK_INITIALIZER<sp/>{NULL,<sp/>0}</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="37" refid="spinlock_8h_1aef31df4fa10911959af449d9f3ccf78f" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>LLOCK_FLAG<sp/>1</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="38"><highlight class="normal"></highlight></codeline> <codeline lineno="39"><highlight class="normal"></highlight><highlight class="comment">//typedef<sp/>volatile<sp/>int<sp/>spinLock_t;</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="40"><highlight class="normal"></highlight></codeline> <codeline lineno="41" refid="structspinLock" refkind="compound"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structspinLock" kindref="compound">spinLock</ref><sp/>{</highlight></codeline> <codeline lineno="42" refid="structspinLock_1af857b66019e1f2a923d48b0fba2e7746" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structspinLock" kindref="compound">spinLock</ref><sp/>*<ref refid="structspinLock_1af857b66019e1f2a923d48b0fba2e7746" kindref="member">next</ref>;</highlight></codeline> <codeline lineno="43" refid="structspinLock_1a243edf7f3d81de2a9c7e3852768e5847" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref><sp/><ref refid="structspinLock_1a243edf7f3d81de2a9c7e3852768e5847" kindref="member">locked</ref>;</highlight></codeline> <codeline lineno="44"><highlight class="normal">};</highlight></codeline> <codeline lineno="45"><highlight class="normal"></highlight></codeline> <codeline lineno="46" refid="spinlock_8h_1a205601d674593c0fff0a54719d27465b" refkind="member"><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structspinLock" kindref="compound">spinLock</ref><sp/>*<ref refid="spinlock_8h_1a205601d674593c0fff0a54719d27465b" kindref="member">spinLock_t</ref>;</highlight></codeline> <codeline lineno="47"><highlight class="normal"></highlight></codeline> <codeline lineno="48"><highlight class="normal"></highlight><highlight class="keyword">extern</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structspinLock" kindref="compound">spinLock</ref><sp/><ref refid="spinlock_8h_1a265ad04ec8650ad0a46179cdaa01dd98" kindref="member">Master</ref>;</highlight></codeline> <codeline lineno="49"><highlight class="normal"></highlight></codeline> <codeline lineno="50"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="spinlock_8h_1a3ed033ffdc33d480e77190d424149415" kindref="member">spinLockInit</ref>(<ref refid="structspinLock" kindref="compound">spinLock_t</ref>);</highlight></codeline> <codeline lineno="51"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="spinlock_8h_1a02e11882c06e98ee0e7ff1a9b4626fb3" kindref="member">spinUnlock</ref>(<ref refid="structspinLock" kindref="compound">spinLock_t</ref>);</highlight></codeline> <codeline lineno="52"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="spinlock_8h_1aed6e978dc2762fbf062e37670b8fa04d" kindref="member">spinTryLock</ref>(<ref refid="structspinLock" kindref="compound">spinLock_t</ref>);</highlight></codeline> <codeline lineno="53"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="spinlock_8h_1a623e97c04239abcce11cdd2826525f2e" kindref="member">spinLock</ref>(<ref refid="structspinLock" kindref="compound">spinLock_t</ref>);</highlight></codeline> <codeline lineno="54"><highlight class="normal"></highlight></codeline> <codeline lineno="55"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="spinlock_8h_1a4a5b56fc59f6a63a4d6cfac573889789" kindref="member">spinLock_scheduler</ref>(<ref refid="structspinLock" kindref="compound">spinLock_t</ref><sp/>*);<sp/></highlight><highlight class="comment">/*<sp/>Only<sp/>use<sp/>this<sp/>spinlock<sp/>in<sp/>the<sp/>sched.<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="56"><highlight class="normal"></highlight></codeline> <codeline lineno="57"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="spinlock_8h_1acba75fe5ed894dc88030f7458b114a94" kindref="member">spinLockLocked</ref>(<ref refid="structspinLock" kindref="compound">spinLock_t</ref><sp/>*);</highlight></codeline> <codeline lineno="58"><highlight class="normal"></highlight></codeline> <codeline lineno="59"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Atomic<sp/>exchange<sp/>(of<sp/>various<sp/>sizes)<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="60"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="include_2sys_2types_8h_1a8f25a50daf29ce2cee1ec038a4d744ea" kindref="member">u_long</ref><sp/>xchg_64(</highlight><highlight class="keyword">volatile</highlight><highlight class="normal"><sp/><ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref><sp/>*ptr,<sp/><ref refid="include_2sys_2types_8h_1a8f25a50daf29ce2cee1ec038a4d744ea" kindref="member">u_long</ref><sp/>x)<sp/>{</highlight></codeline> <codeline lineno="61"><highlight class="normal"><sp/><sp/>__asm__<sp/>__volatile__(</highlight><highlight class="stringliteral">"xchgq<sp/>%1,%0"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/>:</highlight><highlight class="stringliteral">"+r"</highlight><highlight class="normal"><sp/>(x),</highlight></codeline> <codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">"+m"</highlight><highlight class="normal"><sp/>(*ptr));</highlight></codeline> <codeline lineno="64"><highlight class="normal"></highlight></codeline> <codeline lineno="65"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>x;</highlight></codeline> <codeline lineno="66"><highlight class="normal">}</highlight></codeline> <codeline lineno="67"><highlight class="normal"></highlight></codeline> <codeline lineno="68"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/>xchg_32(</highlight><highlight class="keyword">volatile</highlight><highlight class="normal"><sp/><ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref><sp/>*ptr,<sp/><ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref><sp/>x)<sp/>{</highlight></codeline> <codeline lineno="69"><highlight class="normal"><sp/><sp/>__asm__<sp/>__volatile__(</highlight><highlight class="stringliteral">"xchgl<sp/>%1,%0"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/>:</highlight><highlight class="stringliteral">"+r"</highlight><highlight class="normal"><sp/>(x),</highlight></codeline> <codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">"+m"</highlight><highlight class="normal"><sp/>(*ptr));</highlight></codeline> <codeline lineno="72"><highlight class="normal"></highlight></codeline> <codeline lineno="73"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>x;</highlight></codeline> <codeline lineno="74"><highlight class="normal">}</highlight></codeline> <codeline lineno="75"><highlight class="normal"></highlight></codeline> <codeline lineno="76"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">short</highlight><highlight class="normal"><sp/>xchg_16(</highlight><highlight class="keyword">volatile</highlight><highlight class="normal"><sp/><ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref><sp/>*ptr,<sp/><ref refid="include_2sys_2types_8h_1a281b4b5562236420969a830503b0ba19" kindref="member">uint16_t</ref><sp/>x)<sp/>{</highlight></codeline> <codeline lineno="77"><highlight class="normal"><sp/><sp/>__asm__<sp/>__volatile__(</highlight><highlight class="stringliteral">"xchgw<sp/>%1,%0"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/>:</highlight><highlight class="stringliteral">"+r"</highlight><highlight class="normal"><sp/>(x),</highlight></codeline> <codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">"+m"</highlight><highlight class="normal"><sp/>(*ptr));</highlight></codeline> <codeline lineno="80"><highlight class="normal"></highlight></codeline> <codeline lineno="81"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>x;</highlight></codeline> <codeline lineno="82"><highlight class="normal">}</highlight></codeline> <codeline lineno="83"><highlight class="normal"></highlight></codeline> <codeline lineno="84"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Test<sp/>and<sp/>set<sp/>a<sp/>bit<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="85"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>atomic_bitsetandtest(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*ptr,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>x)<sp/>{</highlight></codeline> <codeline lineno="86"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>out;</highlight></codeline> <codeline lineno="87"><highlight class="normal"><sp/><sp/>__asm__<sp/>__volatile__(</highlight><highlight class="stringliteral">"lock;<sp/>bts<sp/>%2,%1\n"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">"sbb<sp/>%0,%0\n"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/>:</highlight><highlight class="stringliteral">"=r"</highlight><highlight class="normal"><sp/>(out),<sp/></highlight><highlight class="stringliteral">"=m"</highlight><highlight class="normal"><sp/>(*(</highlight><highlight class="keyword">volatile</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>*)ptr)</highlight></codeline> <codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/>:</highlight><highlight class="stringliteral">"Ir"</highlight><highlight class="normal"><sp/>(x)</highlight></codeline> <codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/>:</highlight><highlight class="stringliteral">"memory"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="92"><highlight class="normal"></highlight></codeline> <codeline lineno="93"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>out;</highlight></codeline> <codeline lineno="94"><highlight class="normal">}</highlight></codeline> <codeline lineno="95"><highlight class="normal"></highlight></codeline> <codeline lineno="96"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline> </programlisting> <location file="C:/Dev/git/UbixOS/sys/include/ubixos/spinlock.h"/> </compounddef> </doxygen>