Home
last modified time | relevance | path

Searched refs:it (Results 1 – 25 of 180) sorted by relevance

12345678

/xnu-11215/osfmk/kern/
H A Dpercpu.h188 for (vm_offset_t it = 0, \
192 it <= __end_ ## it; \
194 it = __next_ ## it, \
207 for (__PERCPU_TYPE(name) it, \
212 (it = __PERCPU_CAST(name, __PERCPU_ADDR(name) + (vm_address_t)__base_ ## it), \
213 __base_ ## it <= __end_ ## it); \
215 __base_ ## it = __next_ ## it, \
227 for (vm_offset_t it = percpu_base.start, __end_ ## it = percpu_base.end; \
228 it <= __end_ ## it; it += percpu_section_size())
244 (it = __PERCPU_CAST(name, __PERCPU_ADDR(name) + (vm_address_t)__base_ ## it), \
[all …]
H A Dsmr.h347 #define smrq_entered_foreach(it, head, field) \ argument
349 ((it) = __container_of_safe(__it, typeof(*(it)), field)); \
383 ((it) = __container_of_safe(__it, typeof(*(it)), field)); \
399 ((it) = __container_of_safe(__it, typeof(*(it)), field)) && \
521 *__chk_##it = __prev_##it; \
522 ((it) = __container_of_safe(smr_serialized_load(__prev_##it), \
524 assert(__chk_##it), __chk_##it = __prev_##it)
533 assert(__chk_##it == __prev_##it); \
535 __prev_##it = &(it)->field.next; \
545 assert(__chk_##it == __prev_##it); \
[all …]
H A Dsmr_hash.h954 it.prev = &it.hd_next->first; in smr_hash_iter_begin()
955 it.link = smr_entered_load(it.prev); in smr_hash_iter_begin()
957 } while (it.link == NULL && it.hd_next < it.hd_last); in smr_hash_iter_begin()
994 it->prev = &it->link->next; in smr_hash_iter_advance()
997 if (it->hd_next == it->hd_last) { in smr_hash_iter_advance()
1000 it->prev = &it->hd_next->first; in smr_hash_iter_advance()
1020 it->link = smr_serialized_load(&it->link->next); in smr_hash_iter_serialized_erase()
1022 smr_serialized_store_relaxed(it->prev, it->link); in smr_hash_iter_serialized_erase()
1025 if (it->hd_next == it->hd_last) { in smr_hash_iter_serialized_erase()
1028 it->prev = &it->hd_next->first; in smr_hash_iter_serialized_erase()
[all …]
H A Dkern_debug.modulemap6 // kern/debug.h gets its own top level module because it includes
9 // libkdd can’t use <kern/kcdata.h> because it doesn’t produce that header
14 // picking up <kern/kcdata.h> via a module, or it will run into all kinds
H A Dcounter_common.c159 zpercpu_foreach(it, *counter) { in counter_load()
160 value += os_atomic_load_wide(it, relaxed); in counter_load()
H A Dkcdata.modulemap4 // <kern/kcdata.h> because it doesn’t produce that header itself, and so Xcode
8 // to avoid accidentally also picking up <kern/kcdata.h> via a module, or it
/xnu-11215/tests/bounded_array_src/
H A Dctor.default.cpp31 for (auto it = array.data(); it != end; ++it) { in tests() local
32 CHECK(*it == T()); in tests()
39 for (auto it = array.data(); it != end; ++it) { in tests() local
40 CHECK(*it == T()); in tests()
47 for (auto it = array.data(); it != end; ++it) { in tests() local
48 CHECK(*it == T()); in tests()
55 for (auto it = array.data(); it != end; ++it) { in tests() local
56 CHECK(*it == T()); in tests()
/xnu-11215/tests/vm/
H A Dmmap.c107 for (struct mmap_spec *it = specs; it->prot != ~0; it++) { variable
109 it->prot, it->flags, fd, it->offs, it->size);
111 if (it->flags & MAP_FIXED) {
112 f_size = PAGE_SIZE * 2 + it->size;
117 (it->offs & PAGE_MASK));
124 p = __mmap(want_p, it->size, it->prot, it->flags, fd, it->offs);
126 if ((it->flags & MAP_UNIX03) && (it->offs & PAGE_MASK)) {
139 delta = it->offs & PAGE_MASK;
140 size = (delta + it->size + PAGE_MASK) & ~PAGE_MASK;
151 for (uint32_t i = 0; i < it->size / 4; i += PAGE_SIZE / 4) {
[all …]
/xnu-11215/doc/observability/
H A Dmt_stackshot.md17 called) sets up state. Then, it enters the debugger trap, and IPIs the other
21 a CPU is derecommended due to thermal limits or otherwise, it will still be
30 in once it is done populating them. Once all CPUs are finished, they exit the
48 finishes with its first queue, it will move on to the other.
71 space, it can reach into other clusters for more.
92 we can add it to the freelist - but this is not ideal. So, stackshot uses
127 the error number as the data), but it's trivial to add more with the
131 easily, but for now, it can be examined in lldb with `showpcpu -V
144 panics, it will not be able to acquire the debugger lock since it is already
150 notices it is set, it will spin in place. Before the initiating CPU spins in
[all …]
/xnu-11215/bsd/kern/
H A Dkern_newsysctl.c596 return it; in sysctl_oid_iterator_begin()
600 it.a = SLIST_NEXT(a, oid_link); in sysctl_oid_iterator_begin()
603 it.a = a; in sysctl_oid_iterator_begin()
605 return it; in sysctl_oid_iterator_begin()
611 struct sysctl_oid *a = it->a; in sysctl_oid_iterator_next_num_order()
612 struct sysctl_oid *b = it->b; in sysctl_oid_iterator_next_num_order()
639 struct sysctl_oid *a = it->a; in sysctl_oid_iterator_next_system_order()
640 struct sysctl_oid *b = it->b; in sysctl_oid_iterator_next_system_order()
1084 struct sysctl_oid_iterator it; in name2oid() local
1280 struct sysctl_oid_iterator it; in sysctl_sysctl_oidfmt() local
[all …]
/xnu-11215/doc/primitives/
H A Dsched_cond.md8 synchronization on kernel threads. Specifically, it provides a wrapper for
43 it has already been queued.
77 signalling that it is active and clearing the queued wakeup. Once done with its consumption it atte…
78 cond (G), signalling that it is inactive and checking for any wakeups that have been issued since t…
80 it will block as in (D).
90 2. Wakeups need not explicitly `thread_wake` the consumer thread if it is already awake. This is be…
91 block if it observes a wakeup has been issued while it was awake.
H A Dstring-handling.md22 `strncmp` is always wrong with -fbounds-safety, and it's unavailable as a
31 Using `strncmp` with two NUL-terminated strings is uncommon and it has no
85 cases, it can also lead to stability issues.
92 instance. However, it creates new problems:
103 * `tsnprintf`: like `snprintf`, but it returns a NUL-terminated string;
127 of indexable pointer, and only once you're done should you convert it to a
148 while it's being modified leads to more forging, which has more chances of
163 it ergonomically, and importantly, without forging. You turn it into a
164 NUL-terminated string at the same time you turn it into a `const` reference,
207 strings, it could be simply more convenient to keep string buffers in some
[all …]
H A Datomics.md15 as this document builds on it, and explains the liberties XNU takes with said
40 to modern C, in the purest C tradition, it is a sharp tool.
60 Indeed, the compiler is perfectly allowed to perform various optimizations it
206 Making it more explicit that the original value is used is hence
235 will always be `expected`, however in case of failure it will be filled with
241 for the failure case ordering, as it is what is used most of the time.
285 Unlike the C11 variant, it lets the reader know in program order that this will
287 one has to jump to the end of the code to understand what it does.
293 Because these loops are LL/SC transactions, it is undefined to perform
329 most compilers, clang included, implement it as an equivalent
[all …]
/xnu-11215/doc/vm/
H A Dfreezer.md8 …. Under memory pressure, the freezer picks apps to freeze. For those apps, it compresses and swaps…
15 Every time the freezer thread wakes up it will try to freeze up to `memorystatus_pick_freeze_count_…
28it shared if it's greater than 1. We don't want to count memory that's simply mapped into the same…
56 …Safari uses the majority of our freezer write budget daily. Interestingly, it also uses the plural…
62 When a frozen process is resumed we call it a thaw. Functionally, this is identical to a regular ap…
64it may still have data on NAND. For example, consider a suspended & frozen app with 100MB of dirty…
68 Once a thawed app goes back into the background, we may re-freeze it. The exact heuristics for re-f…
70 …d memory from existing in-memory segments to the new freezer segments, but it will skip over data …
82it is **not** killed. It's simply put back into the idle band under the assumption that jetsam wil…
87 NAND writes are a limited resource. The drive can only sustain so many writes before it will start …
[all …]
H A Dmemorystatus.md9 certain resources. Currently it monitors the following resources:
60 Whenever it's woken up the memorystatus thread does the following:
67 Notice that the memorystatus thread does not explicitly check why it was woken up.
69 thread is woken up *blindly* and it will do a full system health check.
113 Currently on non-macOS systems, it's defined as `pageable_external + free + secluded_over_target + …
116 … memory is a special pool of memory that's intended for the camera so that it can startup faster o…
122 And it calls into `memorystatus_pages_update` to actually update `memorystatus_available_pages` and…
158 …s 1 on most platforms. But if app swap is enabled (M1 and later iPad Pros) it will return the tota…
164 When awoken it calls `consider_vm_pressure_events` which winds its way to `memorystatus_update_vm_p…
179 dasd reads this snapshot and uses it as an input for its freezer recommendation algorithm. However,…
[all …]
/xnu-11215/bsd/miscfs/devfs/
H A DREADME9 expect it to be highly useless for a while,
13 it works like this:
17 for reasons that will become obvious in a second. Think of it as a
18 BLUEPRINT of the DEVFS tree. Each back node has associated with it
23 and a link to the directory that holds it. It is sometimes refered
26 When you mount the devfs somewhere (you can mount it multiple times in
35 The back plane has a mount structure and all that stuff, but it is in
66 it is easily recovered.. Particularly as there will eventually be
99 directory, even though it's been moved, because the directory that
115 4/ I'm pretty sure my use of vnodes is bad and it may be 'losing'
/xnu-11215/doc/building/
H A Dbound_checks.md6 is a lesser evil than allowing an attacker to compromise the system, it is
25 * when it is disabled, whether we should allow `__indexable` and
27 * when it is enabled, whether a trap should be a panic, or whether it should
29 * when it is set to panic, whether we should optimize for code size at the
56 * (nothing): -fbounds-safety is disabled; it is an error to use `__indexable`
75 do not enable `bound-checks` lightly, as it can introduce new reasons that xnu
86 changes to xnu such that it builds without any diagnostics, and testing at desk
119 Until `bound-checks-soft` is enabled, it must still be possible to build that
122 it disables warnings that will frequently trip in plain C files that are
124 are compatible with -fbounds-safety to continue to build without it, while
[all …]
H A Dxnu_build_consolidation.md13 Given the time it takes to compile all three different variants (release, debug and development) fo…
15 reduce the number of existing builds, as well as to set up a simple framework that makes it easier …
33 * Just like other components, the kernel has its share of responsibility when it comes to setting u…
90 feature, and the ARM ARM specifies how it can be discovered). For Apple-specific features, these ar…
99 topology-related information into XNU, by parsing it from the device tree and exporting it to KEXTs…
128 and very often checked at various places across XNU and elsewhere, it made sense to keep it as a co…
/xnu-11215/osfmk/kextd/
H A Dkextd_mach.defs16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
41 /* Ping kextd, launchd starts it if it's not running. */
/xnu-11215/doc/allocators/
H A Dread-only.md44 cheaply and easily as other data, but writing to it must be done through the
70 If this is violated, it suggests that a use-after-free has happened -- perhaps
77 threats. This means that for most data, it simply doesn't make sense to use
78 it. Its use is primarily geared toward allocations supporting security
86 and it must be created by passing `ZC_READONLY` through either `ZONE_INIT` or
94 Once a read-only zone is created, the API for using it is small and simple.
101 and panic if it doesn't.
/xnu-11215/tools/tests/perf_index/
H A DREADME14 number of seconds it took to standard out as a decimal number. Some of the test
16 towards the time. The workload and the time it takes to be performed differs
32 from every client, it will stop timing and output the elapsed time.
40 then writes a byte to every page to ensure it is paged in. Then copies n bytes
42 n/2, it keeps repeating the copies until n bytes are copied.
69 Alternatively you can build it yourself using make like so:
/xnu-11215/tools/lldbmacros/
H A DREADME.md91 ii. search for a string in the output and selectively print the line containing it.
148 …> : pass the output of command to <plugin> for processing and followup with command requests by it.
208 …flag or value in some field or variable. The way it works is every time lldb wants to print an obj…
209 for registered summaries. We can define python functions and hook it up with lldb as callbacks for …
230 …)` is displayed. [In case you do not wish to have header then still define it as "" (empty string)…
266 …seem that the lldb process is hung. But it is not. You can use "-i" option to get immediate output…
314 …abular data on console and then 2 weeks later again messing with it for a new field, it is recomme…
316 …* any python string can be invoked to "".format() and hence makes it very easy to play with formats
361 … variable is supposed to hold non native type of object, it is good idea to comment what type it h…
373 To contribute new commands or fixes to existing one, it is recommended that you follow the procedur…
[all …]
/xnu-11215/osfmk/mach/
H A Dresource_notify.defs16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
69 observation_nsecs : int64_t; /* time it took to hit limit */
89 observation_nsecs : int64_t; /* time it took to hit limit */
109 observation_nsecs : int64_t; /* time it took to hit limit */
H A Dvfs_nspace.defs16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
59 * nspace_resolve_path should not be moved even after it's not used, it's going
/xnu-11215/libkern/kxld/
H A Dkxld_array.c362 const u_char *it; in kxld_array_get_index() local
368 it = item; in kxld_array_get_index()
371 if (pool->buffer <= it && it < pool->buffer + array->pool_capacity) { in kxld_array_get_index()
372 diff = it - pool->buffer; in kxld_array_get_index()

12345678