arch/microblaze/lib/memset.c

Source file repositories/reference/linux-study-clean/arch/microblaze/lib/memset.c

File Facts

System
Linux kernel
Corpus path
arch/microblaze/lib/memset.c
Extension
.c
Size
2257 bytes
Lines
95
Domain
Architecture Layer
Bucket
arch/microblaze
Inferred role
Architecture Layer: exported/initcall integration point
Status
integration implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

switch ((unsigned) src & 3) {
		case 1:
			*src++ = c;
			--n;
			fallthrough;
		case 2:
			*src++ = c;
			--n;
			fallthrough;
		case 3:
			*src++ = c;
			--n;
		}

		i_src  = (void *)src;

		/* Do as many full-word copies as we can */
		for (; n >= 4; n -= 4)
			*i_src++ = w32;

		src  = (void *)i_src;
	}

	/* Simple, byte oriented memset or the rest of count. */
	switch (n) {
	case 3:
		*src++ = c;
		fallthrough;
	case 2:
		*src++ = c;
		fallthrough;
	case 1:
		*src++ = c;
		break;
	default:
		break;
	}

	return v_src;
}
EXPORT_SYMBOL(memset);
#endif /* CONFIG_OPT_LIB_FUNCTION */

Annotation

Implementation Notes