std
std::cout << "x=" << x << std::endl;
std(__SWR|__SNBF, STDERR_FILENO) /* stderr */
std(__SRD, STDIN_FILENO), /* stdin */
std(__SWR, STDOUT_FILENO), /* stdout */
int i, j, std, extra, arglen, found;
std = 1;
if (std && std_options[i].name == NULL)
std = 0;
if (std)
uint8_t std[6] = { DM9000MAC };
memcpy(en, std, 6);
memcpy(l->en, std, 6);
# define stlong std /* store "C" long */
# define stptr std /* store "C" pointer */
# define streg std /* store PPC general register */
std i+\r, i*8+\dst
std r0, [r2 + %lo(what)]
fix16_t mean, fix16_t std,
fix16_t mean, fix16_t std,
params->m_Mean_Variance_Estimator___Std = std;
ohci_soft_td_t *std, *sdone, *stdnext;
std = ohci_hash_find_td(sc, done);
if (std != NULL) {
usb_syncmem(&std->dma, std->offs, sizeof(*std->td),
std->dnext = sdone;
done = O32TOH(std->td->td_nexttd);
sdone = std;
DPRINTFN(10, "add TD %#jx", (uintptr_t)std, 0, 0, 0);
for (std = sdone; std; std = std->dnext)
ohci_dump_td(sc, std);
for (std = sdone; std; std = stdnext) {
stdnext = std->dnext;
if (std->held == NULL) {
DPRINTFN(10, "std=%#jx held is null", (uintptr_t)std,
ohci_hash_rem_td(sc, std);
ohci_free_std_locked(sc, std);
xfer = std->xfer;
(uintptr_t)std, (uintptr_t)xfer,
len = std->len;
if (std->td->td_cbp != 0)
len -= O32TOH(std->td->td_be) -
O32TOH(std->td->td_cbp) + 1;
DPRINTFN(10, "len=%jd, flags=%#jx", len, std->flags, 0, 0);
if (std->flags & OHCI_ADD_LEN)
cc = OHCI_TD_GET_CC(O32TOH(std->td->td_flags));
ohci_hash_rem_td(sc, std);
if (std->flags & OHCI_CALL_DONE) {
for (p = std; p->xfer == xfer; p = n) {
ohci_hash_add_td(ohci_softc_t *sc, ohci_soft_td_t *std)
int h = HASH(std->physaddr);
LIST_INSERT_HEAD(&sc->sc_hash_tds[h], std, hnext);
ohci_hash_rem_td(ohci_softc_t *sc, ohci_soft_td_t *std)
LIST_REMOVE(std, hnext);
ohci_soft_td_t *std;
for (std = LIST_FIRST(&sc->sc_hash_tds[h]);
std != NULL;
std = LIST_NEXT(std, hnext))
if (std->physaddr == a)
return std;
ohci_dump_tds(ohci_softc_t *sc, ohci_soft_td_t *std)
for (; std; std = std->nexttd) {
ohci_dump_td(sc, std);
KASSERTMSG(std->nexttd == NULL || std != std->nexttd,
"std %p next %p", std, std->nexttd);
ohci_dump_td(ohci_softc_t *sc, ohci_soft_td_t *std)
usb_syncmem(&std->dma, std->offs, sizeof(*std->td),
uint32_t flags = O32TOH(std->td->td_flags);
DPRINTF("TD(%#jx) at 0x%08jx:", (uintptr_t)std, std->physaddr, 0, 0);
(u_long)O32TOH(std->td->td_cbp),
(u_long)O32TOH(std->td->td_nexttd),
(u_long)O32TOH(std->td->td_be), 0);
ohci_soft_td_t *std;
std = NULL;
std = ohci_alloc_std(sc);
if (std == NULL)
opipe->tail.td = std;
std->held = &opipe->tail.td;
tdphys = std->physaddr;
if (std != NULL) {
ohci_free_std(sc, std);
ohci_soft_td_t *std;
std = ohci_hash_find_td(sc, O32TOH(sed->ed->ed_headp));
pipe, std);
if (std)
ohci_dump_td(sc, std);
ohci_soft_td_t *std;
std = ohci_alloc_std(sc);
if (std)
DPRINTFN(10, "new std=%#jx now held at %#jx", (uintptr_t)std,
*(p->held) = std;
std->held = p->held;
std->xfer = xfer;
ohci_soft_td_t *std = ox->ox_stds[i];
if (std == NULL)
ohci_free_std_locked(sc, std);
ohci_soft_td_t *std;
std = ox->ox_stds[0];
std->td->td_flags &= HTOO32(~OHCI_TD_TOGGLE_MASK);
std->td->td_flags |= HTOO32(OHCI_TD_SET_TOGGLE(OHCI_TD_TOGGLE_1));
usb_syncmem(&std->dma,
std->offs + offsetof(ohci_td_t, td_flags),
sizeof(std->td->td_flags),
ohci_soft_td_t *std = ox->ox_stds[i];
if (std == NULL)
if (std != opipe->tail.td)
ohci_free_std_locked(sc, std);
ohci_soft_td_t *std = ox->ox_stds[i];
if (std != NULL)
if (std != opipe->tail.td)
ohci_free_std_locked(sc, std);
ohci_soft_td_t *std;
kmem_alloc(sizeof(*std) * OHCI_TD_CHUNK, KM_SLEEP);
std = &stds[i];
std->td = KERNADDR(&dma, offs);
std->physaddr = DMAADDR(&dma, offs);
std->dma = dma;
std->offs = offs;
std->nexttd = sc->sc_freetds;
sc->sc_freetds = std;
std = sc->sc_freetds;
sc->sc_freetds = std->nexttd;
memset(std->td, 0, sizeof(*std->td));
std->nexttd = NULL;
std->xfer = NULL;
std->held = NULL;
return std;
ohci_free_std_locked(ohci_softc_t *sc, ohci_soft_td_t *std)
std->nexttd = sc->sc_freetds;
sc->sc_freetds = std;
ohci_free_std(ohci_softc_t *sc, ohci_soft_td_t *std)
ohci_free_std_locked(sc, std);
ohci_soft_td_t *std = ox->ox_stds[i];
if (std == NULL)
ohci_free_std_locked(sc, std);
uhci_soft_td_t *std, *fstd = NULL, *lstd = NULL;
for (std = fstd; std != lstd; std = std->link.std) {
usb_syncmem(&std->dma,
std->offs + offsetof(uhci_td_t, td_status),
sizeof(std->td.td_status),
status = le32toh(std->td.td_status);
usb_syncmem(&std->dma,
std->offs + offsetof(uhci_td_t, td_status),
sizeof(std->td.td_status), BUS_DMASYNC_PREREAD);
(uintptr_t)ux, (uintptr_t)std, 0, 0);
usb_syncmem(&std->dma,
std->offs + offsetof(uhci_td_t, td_token),
sizeof(std->td.td_token),
UHCI_TD_GET_MAXLEN(le32toh(std->td.td_token))) {
uhci_soft_td_t *std;
std = stds[n];
uhci_dump_td(std);
usb_syncmem(&std->dma,
std->offs + offsetof(uhci_td_t, td_status),
sizeof(std->td.td_status),
status = le32toh(std->td.td_status);
for (std = ux->ux_stdstart; std != NULL; std = std->link.std) {
usb_syncmem(&std->dma, std->offs, sizeof(std->td),
nstatus = le32toh(std->td.td_status);
if (UHCI_TD_GET_PID(le32toh(std->td.td_token)) !=
if (std != NULL)
upipe->nexttoggle = UHCI_TD_GET_DT(le32toh(std->td.td_token));
uhci_soft_td_t *std;
std = KERNADDR(&dma, offs);
std->physaddr = DMAADDR(&dma, offs);
std->dma = dma;
std->offs = offs;
std->link.std = sc->sc_freetds;
sc->sc_freetds = std;
std = sc->sc_freetds;
sc->sc_freetds = std->link.std;
memset(&std->td, 0, sizeof(uhci_td_t));
return std;
uhci_free_std_locked(uhci_softc_t *sc, uhci_soft_td_t *std)
if (le32toh(std->td.td_token) == TD_IS_FREE) {
printf("%s: freeing free TD %p\n", __func__, std);
std->td.td_token = htole32(TD_IS_FREE);
std->link.std = sc->sc_freetds;
sc->sc_freetds = std;
uhci_free_std(uhci_softc_t *sc, uhci_soft_td_t *std)
uhci_free_std_locked(sc, std);
uhci_free_std_chain(uhci_softc_t *sc, uhci_soft_td_t *std,
for (p = std; p != stdend; p = p->link.std) {
for (; std != stdend; std = p) {
p = std->link.std;
uhci_free_std(sc, std);
uhci_soft_td_t *std = ux->ux_stds[i];
if (le32toh(std->td.td_token) == TD_IS_FREE) {
printf("%s: freeing free TD %p\n", __func__, std);
std->td.td_token = htole32(TD_IS_FREE);
ux->ux_stds[i]->link.std = sc->sc_freetds;
sc->sc_freetds = std;
uhci_soft_td_t *std, *prev;
std = prev = NULL;
for (offs = i = 0; len != 0 && i < uxfer->ux_nstd; i++, prev = std) {
std = uxfer->ux_stds[i];
prev->link.std = std;
std->physaddr | UHCI_PTR_VF | UHCI_PTR_TD
usb_syncmem(&std->dma, std->offs, sizeof(std->td),
std->td.td_link = htole32(UHCI_PTR_T | UHCI_PTR_VF | UHCI_PTR_TD);
std->td.td_status = htole32(status);
std->td.td_token = htole32(
std->td.td_buffer = htole32(DMAADDR(dma, offs));
std->link.std = NULL;
usb_syncmem(&std->dma, std->offs, sizeof(std->td),
std = uxfer->ux_stds[i++];
std->td.td_link = htole32(UHCI_PTR_T | UHCI_PTR_VF | UHCI_PTR_TD);
std->td.td_status = htole32(status);
std->td.td_token = htole32(
std->td.td_buffer = 0;
usb_syncmem(&std->dma, std->offs, sizeof(std->td),
std->link.std = NULL;
prev->link.std = std;
std->physaddr | UHCI_PTR_VF | UHCI_PTR_TD
*lstd = std;
uhci_soft_td_t *std;
for (std = ux->ux_stdstart; std != NULL; std = std->link.std) {
usb_syncmem(&std->dma,
std->offs + offsetof(uhci_td_t, td_status),
sizeof(std->td.td_status),
std->td.td_status &= htole32(~(UHCI_TD_ACTIVE | UHCI_TD_IOC));
usb_syncmem(&std->dma,
std->offs + offsetof(uhci_td_t, td_status),
sizeof(std->td.td_status),
dataend->link.std = stat;
setup->link.std = next;
stat->link.std = NULL;
uhci_soft_td_t *std;
for (std = sc->sc_vframes[0].htd, link = 0;
std = std->link.std) {
link = le32toh(std->td.td_link);
uhci_dump_td(std);
sxqh = (uhci_soft_qh_t *)std;
uhci_soft_td_t *std = NULL;
std = isoc->stds[next];
std->td.td_buffer = htole32(buf);
std->td.td_status = htole32(status);
std->td.td_token &= htole32(~UHCI_TD_MAXLEN_MASK);
std->td.td_token |= htole32(UHCI_TD_SET_MAXLEN(len));
usb_syncmem(&std->dma, std->offs, sizeof(std->td),
uhci_dump_td(std);
ux->ux_stdstart = std;
ux->ux_stdend = std;
uhci_soft_td_t *std;
std = stds[n];
usb_syncmem(&std->dma,
std->offs + offsetof(uhci_td_t, td_status),
sizeof(std->td.td_status),
std->td.td_status &= htole32(~(UHCI_TD_ACTIVE | UHCI_TD_IOC));
usb_syncmem(&std->dma,
std->offs + offsetof(uhci_td_t, td_status),
sizeof(std->td.td_status),
usb_syncmem(&std->dma,
std->offs + offsetof(uhci_td_t, td_token),
sizeof(std->td.td_token),
len = UHCI_TD_GET_MAXLEN(le32toh(std->td.td_token));
uhci_soft_td_t *std, *vstd;
std = isoc->stds[i];
usb_syncmem(&std->dma,
std->offs + offsetof(uhci_td_t, td_status),
sizeof(std->td.td_status),
std->td.td_status &= htole32(~UHCI_TD_ACTIVE);
usb_syncmem(&std->dma,
std->offs + offsetof(uhci_td_t, td_status),
sizeof(std->td.td_status),
std = isoc->stds[i];
vstd != NULL && vstd->link.std != std;
vstd = vstd->link.std)
printf("%s: %p not found\n", __func__, std);
vstd->link = std->link;
usb_syncmem(&std->dma,
std->offs + offsetof(uhci_td_t, td_link),
sizeof(std->td.td_link),
vstd->td.td_link = std->td.td_link;
uhci_free_std_locked(sc, std);
uhci_soft_td_t *std, *vstd;
std = uhci_alloc_std(sc);
if (std == 0)
std->td.td_status = htole32(UHCI_TD_IOS); /* iso, inactive */
std->td.td_token = htole32(token);
usb_syncmem(&std->dma, std->offs, sizeof(std->td),
isoc->stds[i] = std;
std = isoc->stds[i];
std->link = vstd->link;
std->td.td_link = vstd->td.td_link;
usb_syncmem(&std->dma,
std->offs + offsetof(uhci_td_t, td_link),
sizeof(std->td.td_link),
vstd->link.std = std;
vstd->td.td_link = htole32(std->physaddr | UHCI_PTR_TD);
uhci_soft_td_t *std;
std = uhci_alloc_std(sc);
if (std == NULL)
std->link.std = NULL;
std->td.td_link = htole32(UHCI_PTR_T);
std->td.td_status = htole32(0); /* inactive */
std->td.td_token = htole32(0);
std->td.td_buffer = htole32(0);
usb_syncmem(&std->dma, std->offs, sizeof(std->td),
lsqh->elink = std;
lsqh->qh.qh_elink = htole32(std->physaddr | UHCI_PTR_TD);
std = uhci_alloc_std(sc);
if (std == NULL || sqh == NULL)
std->link.sqh = sqh;
std->td.td_link = htole32(sqh->physaddr | UHCI_PTR_QH);
std->td.td_status = htole32(UHCI_TD_IOS); /* iso, inactive */
std->td.td_token = htole32(0);
std->td.td_buffer = htole32(0);
usb_syncmem(&std->dma, std->offs, sizeof(std->td),
sc->sc_vframes[i].htd = std;
sc->sc_vframes[i].etd = std;
sc->sc_pframes[j] = htole32(std->physaddr);
uhci_free_std(sc, std);
uhci_dump_tds(uhci_soft_td_t *std)
for (td = std; td != NULL; td = td->link.std) {
struct uhci_soft_td *std;
struct v4l2_standard *std)
std->id = V4L2_STD_NTSC_M;
strlcpy(std->name, "NTSC-M", sizeof(std->name));
std->frameperiod.numerator = 1001;
std->frameperiod.denominator = 30000;
std->framelines = 525;
std->id = V4L2_STD_UNKNOWN;
strlcpy(std->name, "Unknown", sizeof(std->name));
video_enum_standard(struct video_softc *sc, struct v4l2_standard *std)
if (std->index != 0)
std->id = V4L2_STD_UNKNOWN;
strlcpy(std->name, "webcam", sizeof(std->name));
v4l2_standard_to_video_standard(std->id, &vstd);
err = hw->enum_standard(sc->hw_softc, std->index, &vstd);
video_standard_to_v4l2_standard(vstd, std);
struct v4l2_standard std;
video_standard_to_v4l2_standard(vstd, &std);
*stdid = std.id;
vi->standards = input->std; /* ... values are the same */
input->std = vi->standards; /* ... values are the same */
struct v4l2_standard *std;
std = data;
return video_enum_standard(sc, std);
v4l2_std_id std;
v4l2_std_id std;
FILE *std[2] = { stdin, stdout };
for (i = 0; i < __arraycount(std); i++) {
f = freopen(path, "w+", std[i]);
ATF_REQUIRE(fprintf(std[i], "garbage") == 7);
ATest<std::size_t>();
ATest<std::ptrdiff_t>();
m_val.exchange(std::atomic<T>(8));
std::memory_order_release, std::memory_order_relaxed);
volatile std::atomic<T> m_val;
std::complex<long double> cld(3.0,4.0);
sum += std::abs(cld);
std::complex<double> cd(3.0,4.0);
sum += std::abs(cd);
std::complex<float> cf(3.0,4.0);
sum += std::abs(cf);
std::thread{thread_fn}.join();
std::ios::sync_with_stdio(false);
std::cin.read(buf, sizeof(buf));
std::cout << std::cin.gcount() << std::endl;
struct v4l2_standard std;
for (std.index = 0; ; std.index++) {
error = ioctl(video_fd, VIDIOC_ENUMSTD, &std);
printf("info.standard.%u=%s\n", std.index, std.name);
std.index = n;
error = ioctl(video_fd, VIDIOC_ENUMSTD, &std);
printf("info.standard.%u=%s\n", std.index, std.name);
if ((std = malloc(len)) == NULL)
if (sysctl(mib, 2, std, &len, NULL, 0) == -1)
} else for (p = std; p; ) {
char *p, *std, path[MAXPATHLEN];
if ((std = getenv("PATH")) == NULL)