* c-c++-common/ubsan/sanitize-recover-7.c (dg-options): Add -w.
[official-gcc.git] / libgo / runtime / proc.c
blob1272669a8bd03964cc23a003aa1291b08adcd8b7
1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 #include <errno.h>
6 #include <limits.h>
7 #include <signal.h>
8 #include <stdlib.h>
9 #include <pthread.h>
10 #include <unistd.h>
12 #include "config.h"
14 #ifdef HAVE_DL_ITERATE_PHDR
15 #include <link.h>
16 #endif
18 #include "runtime.h"
19 #include "arch.h"
20 #include "defs.h"
21 #include "go-type.h"
23 #ifdef USING_SPLIT_STACK
25 /* FIXME: These are not declared anywhere. */
27 extern void __splitstack_getcontext(void *context[10]);
29 extern void __splitstack_setcontext(void *context[10]);
31 extern void *__splitstack_makecontext(size_t, void *context[10], size_t *);
33 extern void * __splitstack_resetcontext(void *context[10], size_t *);
35 extern void *__splitstack_find(void *, void *, size_t *, void **, void **,
36 void **);
38 extern void __splitstack_block_signals (int *, int *);
40 extern void __splitstack_block_signals_context (void *context[10], int *,
41 int *);
43 #endif
45 #ifndef PTHREAD_STACK_MIN
46 # define PTHREAD_STACK_MIN 8192
47 #endif
49 #if defined(USING_SPLIT_STACK) && defined(LINKER_SUPPORTS_SPLIT_STACK)
50 # define StackMin PTHREAD_STACK_MIN
51 #else
52 # define StackMin ((sizeof(char *) < 8) ? 2 * 1024 * 1024 : 4 * 1024 * 1024)
53 #endif
55 uintptr runtime_stacks_sys;
57 void gtraceback(G*)
58 __asm__(GOSYM_PREFIX "runtime.gtraceback");
60 #ifdef __rtems__
61 #define __thread
62 #endif
64 static __thread G *g;
66 #ifndef SETCONTEXT_CLOBBERS_TLS
68 static inline void
69 initcontext(void)
73 static inline void
74 fixcontext(ucontext_t *c __attribute__ ((unused)))
78 #else
80 # if defined(__x86_64__) && defined(__sun__)
82 // x86_64 Solaris 10 and 11 have a bug: setcontext switches the %fs
83 // register to that of the thread which called getcontext. The effect
84 // is that the address of all __thread variables changes. This bug
85 // also affects pthread_self() and pthread_getspecific. We work
86 // around it by clobbering the context field directly to keep %fs the
87 // same.
89 static __thread greg_t fs;
91 static inline void
92 initcontext(void)
94 ucontext_t c;
96 getcontext(&c);
97 fs = c.uc_mcontext.gregs[REG_FSBASE];
100 static inline void
101 fixcontext(ucontext_t* c)
103 c->uc_mcontext.gregs[REG_FSBASE] = fs;
106 # elif defined(__NetBSD__)
108 // NetBSD has a bug: setcontext clobbers tlsbase, we need to save
109 // and restore it ourselves.
111 static __thread __greg_t tlsbase;
113 static inline void
114 initcontext(void)
116 ucontext_t c;
118 getcontext(&c);
119 tlsbase = c.uc_mcontext._mc_tlsbase;
122 static inline void
123 fixcontext(ucontext_t* c)
125 c->uc_mcontext._mc_tlsbase = tlsbase;
128 # elif defined(__sparc__)
130 static inline void
131 initcontext(void)
135 static inline void
136 fixcontext(ucontext_t *c)
138 /* ??? Using
139 register unsigned long thread __asm__("%g7");
140 c->uc_mcontext.gregs[REG_G7] = thread;
141 results in
142 error: variable ‘thread’ might be clobbered by \
143 ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
144 which ought to be false, as %g7 is a fixed register. */
146 if (sizeof (c->uc_mcontext.gregs[REG_G7]) == 8)
147 asm ("stx %%g7, %0" : "=m"(c->uc_mcontext.gregs[REG_G7]));
148 else
149 asm ("st %%g7, %0" : "=m"(c->uc_mcontext.gregs[REG_G7]));
152 # elif defined(_AIX)
154 static inline void
155 initcontext(void)
159 static inline void
160 fixcontext(ucontext_t* c)
162 // Thread pointer is in r13, per 64-bit ABI.
163 if (sizeof (c->uc_mcontext.jmp_context.gpr[13]) == 8)
164 asm ("std 13, %0" : "=m"(c->uc_mcontext.jmp_context.gpr[13]));
167 # else
169 # error unknown case for SETCONTEXT_CLOBBERS_TLS
171 # endif
173 #endif
175 // ucontext_arg returns a properly aligned ucontext_t value. On some
176 // systems a ucontext_t value must be aligned to a 16-byte boundary.
177 // The g structure that has fields of type ucontext_t is defined in
178 // Go, and Go has no simple way to align a field to such a boundary.
179 // So we make the field larger in runtime2.go and pick an appropriate
180 // offset within the field here.
181 static ucontext_t*
182 ucontext_arg(uintptr* go_ucontext)
184 uintptr_t p = (uintptr_t)go_ucontext;
185 size_t align = __alignof__(ucontext_t);
186 if(align > 16) {
187 // We only ensured space for up to a 16 byte alignment
188 // in libgo/go/runtime/runtime2.go.
189 runtime_throw("required alignment of ucontext_t too large");
191 p = (p + align - 1) &~ (uintptr_t)(align - 1);
192 return (ucontext_t*)p;
195 // We can not always refer to the TLS variables directly. The
196 // compiler will call tls_get_addr to get the address of the variable,
197 // and it may hold it in a register across a call to schedule. When
198 // we get back from the call we may be running in a different thread,
199 // in which case the register now points to the TLS variable for a
200 // different thread. We use non-inlinable functions to avoid this
201 // when necessary.
203 G* runtime_g(void) __attribute__ ((noinline, no_split_stack));
206 runtime_g(void)
208 return g;
211 M* runtime_m(void) __attribute__ ((noinline, no_split_stack));
214 runtime_m(void)
216 if(g == nil)
217 return nil;
218 return g->m;
221 // Set g.
222 void
223 runtime_setg(G* gp)
225 g = gp;
228 void runtime_newosproc(M *)
229 __asm__(GOSYM_PREFIX "runtime.newosproc");
231 // Start a new thread.
232 void
233 runtime_newosproc(M *mp)
235 pthread_attr_t attr;
236 sigset_t clear, old;
237 pthread_t tid;
238 int tries;
239 int ret;
241 if(pthread_attr_init(&attr) != 0)
242 runtime_throw("pthread_attr_init");
243 if(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) != 0)
244 runtime_throw("pthread_attr_setdetachstate");
246 // Block signals during pthread_create so that the new thread
247 // starts with signals disabled. It will enable them in minit.
248 sigfillset(&clear);
250 #ifdef SIGTRAP
251 // Blocking SIGTRAP reportedly breaks gdb on Alpha GNU/Linux.
252 sigdelset(&clear, SIGTRAP);
253 #endif
255 sigemptyset(&old);
256 pthread_sigmask(SIG_BLOCK, &clear, &old);
258 for (tries = 0; tries < 20; tries++) {
259 ret = pthread_create(&tid, &attr, runtime_mstart, mp);
260 if (ret != EAGAIN) {
261 break;
263 runtime_usleep((tries + 1) * 1000); // Milliseconds.
266 pthread_sigmask(SIG_SETMASK, &old, nil);
268 if (ret != 0) {
269 runtime_printf("pthread_create failed: %d\n", ret);
270 runtime_throw("pthread_create");
274 // Switch context to a different goroutine. This is like longjmp.
275 void runtime_gogo(G*) __attribute__ ((noinline));
276 void
277 runtime_gogo(G* newg)
279 #ifdef USING_SPLIT_STACK
280 __splitstack_setcontext((void*)(&newg->stackcontext[0]));
281 #endif
282 g = newg;
283 newg->fromgogo = true;
284 fixcontext(ucontext_arg(&newg->context[0]));
285 setcontext(ucontext_arg(&newg->context[0]));
286 runtime_throw("gogo setcontext returned");
289 // Save context and call fn passing g as a parameter. This is like
290 // setjmp. Because getcontext always returns 0, unlike setjmp, we use
291 // g->fromgogo as a code. It will be true if we got here via
292 // setcontext. g == nil the first time this is called in a new m.
293 void runtime_mcall(FuncVal *) __attribute__ ((noinline));
294 void
295 runtime_mcall(FuncVal *fv)
297 M *mp;
298 G *gp;
299 #ifndef USING_SPLIT_STACK
300 void *afterregs;
301 #endif
303 // Ensure that all registers are on the stack for the garbage
304 // collector.
305 __builtin_unwind_init();
307 gp = g;
308 mp = gp->m;
309 if(gp == mp->g0)
310 runtime_throw("runtime: mcall called on m->g0 stack");
312 if(gp != nil) {
314 #ifdef USING_SPLIT_STACK
315 __splitstack_getcontext((void*)(&g->stackcontext[0]));
316 #else
317 // We have to point to an address on the stack that is
318 // below the saved registers.
319 gp->gcnextsp = (uintptr)(&afterregs);
320 #endif
321 gp->fromgogo = false;
322 getcontext(ucontext_arg(&gp->context[0]));
324 // When we return from getcontext, we may be running
325 // in a new thread. That means that g may have
326 // changed. It is a global variables so we will
327 // reload it, but the address of g may be cached in
328 // our local stack frame, and that address may be
329 // wrong. Call the function to reload the value for
330 // this thread.
331 gp = runtime_g();
332 mp = gp->m;
334 if(gp->traceback != nil)
335 gtraceback(gp);
337 if (gp == nil || !gp->fromgogo) {
338 #ifdef USING_SPLIT_STACK
339 __splitstack_setcontext((void*)(&mp->g0->stackcontext[0]));
340 #endif
341 mp->g0->entry = fv;
342 mp->g0->param = gp;
344 // It's OK to set g directly here because this case
345 // can not occur if we got here via a setcontext to
346 // the getcontext call just above.
347 g = mp->g0;
349 fixcontext(ucontext_arg(&mp->g0->context[0]));
350 setcontext(ucontext_arg(&mp->g0->context[0]));
351 runtime_throw("runtime: mcall function returned");
355 // Goroutine scheduler
356 // The scheduler's job is to distribute ready-to-run goroutines over worker threads.
358 // The main concepts are:
359 // G - goroutine.
360 // M - worker thread, or machine.
361 // P - processor, a resource that is required to execute Go code.
362 // M must have an associated P to execute Go code, however it can be
363 // blocked or in a syscall w/o an associated P.
365 // Design doc at http://golang.org/s/go11sched.
367 extern bool* runtime_getCgoHasExtraM()
368 __asm__ (GOSYM_PREFIX "runtime.getCgoHasExtraM");
369 extern G* allocg(void)
370 __asm__ (GOSYM_PREFIX "runtime.allocg");
372 Sched* runtime_sched;
373 int32 runtime_ncpu;
375 bool runtime_isarchive;
377 extern void kickoff(void)
378 __asm__(GOSYM_PREFIX "runtime.kickoff");
379 extern void mstart1(void)
380 __asm__(GOSYM_PREFIX "runtime.mstart1");
381 extern void stopm(void)
382 __asm__(GOSYM_PREFIX "runtime.stopm");
383 extern void handoffp(P*)
384 __asm__(GOSYM_PREFIX "runtime.handoffp");
385 extern void wakep(void)
386 __asm__(GOSYM_PREFIX "runtime.wakep");
387 extern void stoplockedm(void)
388 __asm__(GOSYM_PREFIX "runtime.stoplockedm");
389 extern void schedule(void)
390 __asm__(GOSYM_PREFIX "runtime.schedule");
391 extern void execute(G*, bool)
392 __asm__(GOSYM_PREFIX "runtime.execute");
393 extern void reentersyscall(uintptr, uintptr)
394 __asm__(GOSYM_PREFIX "runtime.reentersyscall");
395 extern void reentersyscallblock(uintptr, uintptr)
396 __asm__(GOSYM_PREFIX "runtime.reentersyscallblock");
397 extern G* gfget(P*)
398 __asm__(GOSYM_PREFIX "runtime.gfget");
399 extern void acquirep(P*)
400 __asm__(GOSYM_PREFIX "runtime.acquirep");
401 extern P* releasep(void)
402 __asm__(GOSYM_PREFIX "runtime.releasep");
403 extern void incidlelocked(int32)
404 __asm__(GOSYM_PREFIX "runtime.incidlelocked");
405 extern void globrunqput(G*)
406 __asm__(GOSYM_PREFIX "runtime.globrunqput");
407 extern P* pidleget(void)
408 __asm__(GOSYM_PREFIX "runtime.pidleget");
409 extern struct mstats* getMemstats(void)
410 __asm__(GOSYM_PREFIX "runtime.getMemstats");
412 bool runtime_isstarted;
414 // Used to determine the field alignment.
416 struct field_align
418 char c;
419 Hchan *p;
422 void getTraceback(G*, G*) __asm__(GOSYM_PREFIX "runtime.getTraceback");
424 // getTraceback stores a traceback of gp in the g's traceback field
425 // and then returns to me. We expect that gp's traceback is not nil.
426 // It works by saving me's current context, and checking gp's traceback field.
427 // If gp's traceback field is not nil, it starts running gp.
428 // In places where we call getcontext, we check the traceback field.
429 // If it is not nil, we collect a traceback, and then return to the
430 // goroutine stored in the traceback field, which is me.
431 void getTraceback(G* me, G* gp)
433 #ifdef USING_SPLIT_STACK
434 __splitstack_getcontext((void*)(&me->stackcontext[0]));
435 #endif
436 getcontext(ucontext_arg(&me->context[0]));
438 if (gp->traceback != nil) {
439 runtime_gogo(gp);
443 // Do a stack trace of gp, and then restore the context to
444 // gp->traceback->gp.
446 void
447 gtraceback(G* gp)
449 Traceback* traceback;
450 M* holdm;
452 traceback = gp->traceback;
453 gp->traceback = nil;
454 holdm = gp->m;
455 if(holdm != nil && holdm != g->m)
456 runtime_throw("gtraceback: m is not nil");
457 gp->m = traceback->gp->m;
458 traceback->c = runtime_callers(1, traceback->locbuf,
459 sizeof traceback->locbuf / sizeof traceback->locbuf[0], false);
460 gp->m = holdm;
461 runtime_gogo(traceback->gp);
464 // Called by pthread_create to start an M.
465 void*
466 runtime_mstart(void *arg)
468 M* mp;
469 G* gp;
471 mp = (M*)(arg);
472 gp = mp->g0;
473 gp->m = mp;
475 g = gp;
477 gp->entry = nil;
478 gp->param = nil;
480 initcontext();
482 // Record top of stack for use by mcall.
483 // Once we call schedule we're never coming back,
484 // so other calls can reuse this stack space.
485 #ifdef USING_SPLIT_STACK
486 __splitstack_getcontext((void*)(&gp->stackcontext[0]));
487 #else
488 gp->gcinitialsp = &arg;
489 // Setting gcstacksize to 0 is a marker meaning that gcinitialsp
490 // is the top of the stack, not the bottom.
491 gp->gcstacksize = 0;
492 gp->gcnextsp = (uintptr)(&arg);
493 #endif
495 // Save the currently active context. This will return
496 // multiple times via the setcontext call in mcall.
497 getcontext(ucontext_arg(&gp->context[0]));
499 if(gp->traceback != nil) {
500 // Got here from getTraceback.
501 // I'm not sure this ever actually happens--getTraceback
502 // may always go to the getcontext call in mcall.
503 gtraceback(gp);
506 if(gp->entry != nil) {
507 // Got here from mcall.
508 FuncVal *fv = gp->entry;
509 void (*pfn)(G*) = (void (*)(G*))fv->fn;
510 G* gp1 = (G*)gp->param;
511 gp->entry = nil;
512 gp->param = nil;
513 __builtin_call_with_static_chain(pfn(gp1), fv);
514 *(int*)0x21 = 0x21;
517 // Initial call to getcontext--starting thread.
519 #ifdef USING_SPLIT_STACK
521 int dont_block_signals = 0;
522 __splitstack_block_signals(&dont_block_signals, nil);
524 #endif
526 mstart1();
528 // mstart1 does not return, but we need a return statement
529 // here to avoid a compiler warning.
530 return nil;
533 typedef struct CgoThreadStart CgoThreadStart;
534 struct CgoThreadStart
536 M *m;
537 G *g;
538 uintptr *tls;
539 void (*fn)(void);
542 void setGContext(void) __asm__ (GOSYM_PREFIX "runtime.setGContext");
544 // setGContext sets up a new goroutine context for the current g.
545 void
546 setGContext()
548 int val;
549 G *gp;
551 initcontext();
552 gp = g;
553 gp->entry = nil;
554 gp->param = nil;
555 #ifdef USING_SPLIT_STACK
556 __splitstack_getcontext((void*)(&gp->stackcontext[0]));
557 val = 0;
558 __splitstack_block_signals(&val, nil);
559 #else
560 gp->gcinitialsp = &val;
561 gp->gcstack = 0;
562 gp->gcstacksize = 0;
563 gp->gcnextsp = (uintptr)(&val);
564 #endif
565 getcontext(ucontext_arg(&gp->context[0]));
567 if(gp->entry != nil) {
568 // Got here from mcall.
569 FuncVal *fv = gp->entry;
570 void (*pfn)(G*) = (void (*)(G*))fv->fn;
571 G* gp1 = (G*)gp->param;
572 gp->entry = nil;
573 gp->param = nil;
574 __builtin_call_with_static_chain(pfn(gp1), fv);
575 *(int*)0x22 = 0x22;
579 void makeGContext(G*, byte*, uintptr)
580 __asm__(GOSYM_PREFIX "runtime.makeGContext");
582 // makeGContext makes a new context for a g.
583 void
584 makeGContext(G* gp, byte* sp, uintptr spsize) {
585 ucontext_t *uc;
587 uc = ucontext_arg(&gp->context[0]);
588 getcontext(uc);
589 uc->uc_stack.ss_sp = sp;
590 uc->uc_stack.ss_size = (size_t)spsize;
591 makecontext(uc, kickoff, 0);
594 // The goroutine g is about to enter a system call.
595 // Record that it's not using the cpu anymore.
596 // This is called only from the go syscall library and cgocall,
597 // not from the low-level system calls used by the runtime.
599 // Entersyscall cannot split the stack: the runtime_gosave must
600 // make g->sched refer to the caller's stack segment, because
601 // entersyscall is going to return immediately after.
603 void runtime_entersyscall(int32) __attribute__ ((no_split_stack));
604 static void doentersyscall(uintptr, uintptr)
605 __attribute__ ((no_split_stack, noinline));
607 void
608 runtime_entersyscall(int32 dummy __attribute__ ((unused)))
610 // Save the registers in the g structure so that any pointers
611 // held in registers will be seen by the garbage collector.
612 getcontext(ucontext_arg(&g->gcregs[0]));
614 // Note that if this function does save any registers itself,
615 // we might store the wrong value in the call to getcontext.
616 // FIXME: This assumes that we do not need to save any
617 // callee-saved registers to access the TLS variable g. We
618 // don't want to put the ucontext_t on the stack because it is
619 // large and we can not split the stack here.
620 doentersyscall((uintptr)runtime_getcallerpc(&dummy),
621 (uintptr)runtime_getcallersp(&dummy));
624 static void
625 doentersyscall(uintptr pc, uintptr sp)
627 // Leave SP around for GC and traceback.
628 #ifdef USING_SPLIT_STACK
630 size_t gcstacksize;
631 g->gcstack = (uintptr)(__splitstack_find(nil, nil, &gcstacksize,
632 (void**)(&g->gcnextsegment),
633 (void**)(&g->gcnextsp),
634 &g->gcinitialsp));
635 g->gcstacksize = (uintptr)gcstacksize;
637 #else
639 void *v;
641 g->gcnextsp = (uintptr)(&v);
643 #endif
645 reentersyscall(pc, sp);
648 static void doentersyscallblock(uintptr, uintptr)
649 __attribute__ ((no_split_stack, noinline));
651 // The same as runtime_entersyscall(), but with a hint that the syscall is blocking.
652 void
653 runtime_entersyscallblock(int32 dummy __attribute__ ((unused)))
655 // Save the registers in the g structure so that any pointers
656 // held in registers will be seen by the garbage collector.
657 getcontext(ucontext_arg(&g->gcregs[0]));
659 // See comment in runtime_entersyscall.
660 doentersyscallblock((uintptr)runtime_getcallerpc(&dummy),
661 (uintptr)runtime_getcallersp(&dummy));
664 static void
665 doentersyscallblock(uintptr pc, uintptr sp)
667 // Leave SP around for GC and traceback.
668 #ifdef USING_SPLIT_STACK
670 size_t gcstacksize;
671 g->gcstack = (uintptr)(__splitstack_find(nil, nil, &gcstacksize,
672 (void**)(&g->gcnextsegment),
673 (void**)(&g->gcnextsp),
674 &g->gcinitialsp));
675 g->gcstacksize = (uintptr)gcstacksize;
677 #else
679 void *v;
681 g->gcnextsp = (uintptr)(&v);
683 #endif
685 reentersyscallblock(pc, sp);
688 // Allocate a new g, with a stack big enough for stacksize bytes.
690 runtime_malg(bool allocatestack, bool signalstack, byte** ret_stack, uintptr* ret_stacksize)
692 uintptr stacksize;
693 G *newg;
694 byte* unused_stack;
695 uintptr unused_stacksize;
696 #if USING_SPLIT_STACK
697 int dont_block_signals = 0;
698 size_t ss_stacksize;
699 #endif
701 if (ret_stack == nil) {
702 ret_stack = &unused_stack;
704 if (ret_stacksize == nil) {
705 ret_stacksize = &unused_stacksize;
707 newg = allocg();
708 if(allocatestack) {
709 stacksize = StackMin;
710 if(signalstack) {
711 stacksize = 32 * 1024; // OS X wants >= 8K, GNU/Linux >= 2K
712 #ifdef SIGSTKSZ
713 if(stacksize < SIGSTKSZ)
714 stacksize = SIGSTKSZ;
715 #endif
718 #if USING_SPLIT_STACK
719 *ret_stack = __splitstack_makecontext(stacksize,
720 (void*)(&newg->stackcontext[0]),
721 &ss_stacksize);
722 *ret_stacksize = (uintptr)ss_stacksize;
723 __splitstack_block_signals_context((void*)(&newg->stackcontext[0]),
724 &dont_block_signals, nil);
725 #else
726 // In 64-bit mode, the maximum Go allocation space is
727 // 128G. Our stack size is 4M, which only permits 32K
728 // goroutines. In order to not limit ourselves,
729 // allocate the stacks out of separate memory. In
730 // 32-bit mode, the Go allocation space is all of
731 // memory anyhow.
732 if(sizeof(void*) == 8) {
733 void *p = runtime_sysAlloc(stacksize, &getMemstats()->stacks_sys);
734 if(p == nil)
735 runtime_throw("runtime: cannot allocate memory for goroutine stack");
736 *ret_stack = (byte*)p;
737 } else {
738 *ret_stack = runtime_mallocgc(stacksize, nil, false);
739 runtime_xadd(&runtime_stacks_sys, stacksize);
741 *ret_stacksize = (uintptr)stacksize;
742 newg->gcinitialsp = *ret_stack;
743 newg->gcstacksize = (uintptr)stacksize;
744 #endif
746 return newg;
749 void resetNewG(G*, void **, uintptr*)
750 __asm__(GOSYM_PREFIX "runtime.resetNewG");
752 // Reset stack information for g pulled out of the cache to start a
753 // new goroutine.
754 void
755 resetNewG(G *newg, void **sp, uintptr *spsize)
757 #ifdef USING_SPLIT_STACK
758 int dont_block_signals = 0;
759 size_t ss_spsize;
761 *sp = __splitstack_resetcontext((void*)(&newg->stackcontext[0]), &ss_spsize);
762 *spsize = ss_spsize;
763 __splitstack_block_signals_context((void*)(&newg->stackcontext[0]),
764 &dont_block_signals, nil);
765 #else
766 *sp = newg->gcinitialsp;
767 *spsize = newg->gcstacksize;
768 if(*spsize == 0)
769 runtime_throw("bad spsize in resetNewG");
770 newg->gcnextsp = (uintptr)(*sp);
771 #endif
774 // Return whether we are waiting for a GC. This gc toolchain uses
775 // preemption instead.
776 bool
777 runtime_gcwaiting(void)
779 return runtime_sched->gcwaiting;