id
int64
0
79.7k
docstring_tokens
sequence
code_tokens
sequence
fun_name
stringlengths
1
108
repo
stringlengths
7
49
starting
stringclasses
3 values
partition
stringclasses
3 values
__index_level_0__
int64
0
58.8k
1,242
[ "called", "from", "serio_driver>connect", "disconnect", "methods", "under", "serio_mutex" ]
[ "'void", "serio_close", "(", "struct", "serio", "*", "serio", ")", "{", "if", "(", "serio", "->", "close", ")", "serio", "->", "close", "(", "serio", ")", ";", "serio_set_drv", "(", "serio", ",", "NULL", ")", ";", "}'" ]
serio_close
lsds/sgx-lkl
single_line
train
1,000
1,243
[ "EoIB", "heartbeat", "packets", "Silently", "ignore", "incoming", "EoIB", "heartbeat", "packets" ]
[ "'static", "int", "eoib_heartbeat_rx", "(", "struct", "io_buffer", "*", "iobuf", ",", "struct", "net_device", "*", "netdev", "__unused", ",", "const", "void", "*", "ll_dest", "__unused", ",", "const", "void", "*", "ll_source", "__unused", ",", "unsigned", "int", "flags", "__unused", ")", "{", "free_iob", "(", "iobuf", ")", ";", "return", "0", ";", "}'" ]
eoib_heartbeat_rx
ipxe/ipxe
multi_line
train
1,001
1,244
[ "Close", "EoIB", "network", "device" ]
[ "'static", "void", "eoib_close", "(", "struct", "net_device", "*", "netdev", ")", "{", "struct", "eoib_device", "*", "eoib", "=", "netdev", "->", "priv", ";", "struct", "ib_device", "*", "ibdev", "=", "eoib", "->", "ibdev", ";", "/*", "Flush", "peer", "cache", "*/", "eoib_flush_peers", "(", "eoib", ")", ";", "/*", "Leave", "broadcast", "group", "*/", "eoib_leave_broadcast_group", "(", "eoib", ")", ";", "/*", "Tear", "down", "the", "queues", "*/", "ib_destroy_qp", "(", "ibdev", ",", "eoib", "->", "qp", ")", ";", "eoib", "->", "qp", "=", "NULL", ";", "ib_destroy_cq", "(", "ibdev", ",", "eoib", "->", "cq", ")", ";", "eoib", "->", "cq", "=", "NULL", ";", "/*", "Close", "IB", "device", "*/", "ib_close", "(", "ibdev", ")", ";", "}'" ]
eoib_close
ipxe/ipxe
multi_line
train
1,002
1,245
[ "Find", "EoIB", "peer", "cache", "entry" ]
[ "'static", "struct", "eoib_peer", "*", "eoib_find_peer", "(", "struct", "eoib_device", "*", "eoib", ",", "const", "uint8_t", "*", "mac", ")", "{", "struct", "eoib_peer", "*", "peer", ";", "/*", "Find", "peer", "cache", "entry", "*/", "list_for_each_entry", "(", "peer", ",", "&eoib->peers", ",", "list", ")", "{", "if", "(", "memcmp", "(", "mac", ",", "peer", "->", "mac", ",", "sizeof", "(", "peer", "->", "mac", ")", ")", "==", "0", ")", "{", "/*", "Move", "peer", "to", "start", "of", "list", "*/", "list_del", "(", "&", "peer", "->", "list", ")", ";", "list_add", "(", "&", "peer", "->", "list", ",", "&", "eoib", "->", "peers", ")", ";", "return", "peer", ";", "}", "}", "return", "NULL", ";", "}'" ]
eoib_find_peer
ipxe/ipxe
multi_line
train
1,003
1,246
[ "Handle", "EoIB", "receive", "completion" ]
[ "'static", "void", "eoib_complete_recv", "(", "struct", "ib_device", "*", "ibdev", "__unused", ",", "struct", "ib_queue_pair", "*", "qp", ",", "struct", "ib_address_vector", "*", "dest", "__unused", ",", "struct", "ib_address_vector", "*", "source", ",", "struct", "io_buffer", "*", "iobuf", ",", "int", "rc", ")", "{", "struct", "eoib_device", "*", "eoib", "=", "ib_qp_get_ownerdata", "(", "qp", ")", ";", "struct", "net_device", "*", "netdev", "=", "eoib", "->", "netdev", ";", "struct", "eoib_header", "*", "eoib_hdr", ";", "struct", "ethhdr", "*", "ethhdr", ";", "/*", "Record", "errors", "*/", "if", "(", "rc", "!=", "0", ")", "{", "netdev_rx_err", "(", "netdev", ",", "iobuf", ",", "rc", ")", ";", "return", ";", "}", "/*", "Sanity", "check", "*/", "if", "(", "iob_len", "(", "iobuf", ")", "<", "(", "sizeof", "(", "*", "eoib_hdr", ")", "+", "sizeof", "(", "*", "ethhdr", ")", ")", ")", "{", "DBGC", "(", "eoib", ",", "\"EoIB", "%s", "received", "packet", "too", "short", "to", "\"", "\"contain", "EoIB", "and", "Ethernet", "headers\\\"", ",", "eoib", "->", "name", ")", ";", "DBGC_HD", "(", "eoib", ",", "iobuf", "->", "data", ",", "iob_len", "(", "iobuf", ")", ")", ";", "netdev_rx_err", "(", "netdev", ",", "iobuf", ",", "-", "EIO", ")", ";", "return", ";", "}", "if", "(", "!", "source", ")", "{", "DBGC", "(", "eoib", ",", "\"EoIB", "%s", "received", "packet", "without", "address", "\"", "\"vector\\\"", ",", "eoib", "->", "name", ")", ";", "netdev_rx_err", "(", "netdev", ",", "iobuf", ",", "-", "ENOTTY", ")", ";", "return", ";", "}", "/*", "Strip", "EoIB", "header", "*/", "iob_pull", "(", "iobuf", ",", "sizeof", "(", "*", "eoib_hdr", ")", ")", ";", "/*", "Update", "neighbour", "cache", "entry,", "if", "any", "*/", "ethhdr", "=", "iobuf", "->", "data", ";", "eoib_rx_av", "(", "eoib", ",", "ethhdr", "->", "h_source", ",", "source", ")", ";", "/*", "Hand", "off", "to", "network", "layer", "*/", "netdev_rx", "(", "netdev", ",", "iobuf", ")", ";", "}'" ]
eoib_complete_recv
ipxe/ipxe
multi_line
train
1,004
1,247
[ "Open", "EoIB", "network", "device" ]
[ "'static", "int", "eoib_open", "(", "struct", "net_device", "*", "netdev", ")", "{", "struct", "eoib_device", "*", "eoib", "=", "netdev", "->", "priv", ";", "struct", "ib_device", "*", "ibdev", "=", "eoib", "->", "ibdev", ";", "int", "rc", ";", "/*", "Open", "IB", "device", "*/", "if", "(", "(", "rc", "=", "ib_open", "(", "ibdev", ")", ")", "!=", "0", ")", "{", "DBGC", "(", "eoib", ",", "\"EoIB", "%s", "could", "not", "open", "%s:", "%s\\\"", ",", "eoib", "->", "name", ",", "ibdev", "->", "name", ",", "strerror", "(", "rc", ")", ")", ";", "goto", "err_ib_open", ";", "}", "/*", "Allocate", "completion", "queue", "*/", "if", "(", "(", "rc", "=", "ib_create_cq", "(", "ibdev", ",", "EOIB_NUM_CQES", ",", "&", "eoib_cq_op", ",", "&", "eoib", "->", "cq", ")", ")", "!=", "0", ")", "{", "DBGC", "(", "eoib", ",", "\"EoIB", "%s", "could", "not", "create", "completion", "queue:", "%s\\\"", ",", "eoib", "->", "name", ",", "strerror", "(", "rc", ")", ")", ";", "goto", "err_create_cq", ";", "}", "/*", "Allocate", "queue", "pair", "*/", "if", "(", "(", "rc", "=", "ib_create_qp", "(", "ibdev", ",", "IB_QPT_UD", ",", "EOIB_NUM_SEND_WQES", ",", "eoib", "->", "cq", ",", "EOIB_NUM_RECV_WQES", ",", "eoib", "->", "cq", ",", "&", "eoib_qp_op", ",", "netdev", "->", "name", ",", "&", "eoib", "->", "qp", ")", ")", "!=", "0", ")", "{", "DBGC", "(", "eoib", ",", "\"EoIB", "%s", "could", "not", "create", "queue", "pair:", "%s\\\"", ",", "eoib", "->", "name", ",", "strerror", "(", "rc", ")", ")", ";", "goto", "err_create_qp", ";", "}", "ib_qp_set_ownerdata", "(", "eoib", "->", "qp", ",", "eoib", ")", ";", "/*", "Fill", "receive", "rings", "*/", "ib_refill_recv", "(", "ibdev", ",", "eoib", "->", "qp", ")", ";", "/*", "Fake", "a", "link", "status", "change", "to", "join", "the", "broadcast", "group", "*/", "eoib_link_state_changed", "(", "eoib", ")", ";", "return", "0", ";", "ib_destroy_qp", "(", "ibdev", ",", "eoib", "->", "qp", ")", ";", "eoib", "->", "qp", "=", "NULL", ";", "err_create_qp", ":", "ib_destroy_cq", "(", "ibdev", ",", "eoib", "->", "cq", ")", ";", "eoib", "->", "cq", "=", "NULL", ";", "err_create_cq", ":", "ib_close", "(", "ibdev", ")", ";", "err_ib_open", ":", "return", "rc", ";", "}'" ]
eoib_open
ipxe/ipxe
multi_line
train
1,005
1,248
[ "Handle", "device", "or", "link", "status", "change" ]
[ "'static", "void", "eoib_notify", "(", "struct", "ib_device", "*", "ibdev", ")", "{", "struct", "eoib_device", "*", "eoib", ";", "/*", "Handle", "link", "status", "change", "for", "any", "attached", "EoIB", "devices", "*/", "list_for_each_entry", "(", "eoib", ",", "&eoib_devices", ",", "list", ")", "{", "if", "(", "eoib", "->", "ibdev", "!=", "ibdev", ")", "continue;", "eoib_link_state_changed", "(", "eoib", ")", ";", "}", "}'" ]
eoib_notify
ipxe/ipxe
multi_line
train
1,006
1,249
[ "EoIB", "network", "device", "Transmit", "packet", "via", "EoIB", "network", "device" ]
[ "'static", "int", "eoib_transmit", "(", "struct", "net_device", "*", "netdev", ",", "struct", "io_buffer", "*", "iobuf", ")", "{", "struct", "eoib_device", "*", "eoib", "=", "netdev", "->", "priv", ";", "struct", "eoib_header", "*", "eoib_hdr", ";", "struct", "ethhdr", "*", "ethhdr", ";", "struct", "ib_address_vector", "*", "av", ";", "size_t", "zlen", ";", "/*", "Sanity", "checks", "*/", "assert", "(", "iob_len", "(", "iobuf", ")", ">=", "sizeof", "(", "*", "ethhdr", ")", ")", ";", "assert", "(", "iob_headroom", "(", "iobuf", ")", ">=", "sizeof", "(", "*", "eoib_hdr", ")", ")", ";", "/*", "Look", "up", "destination", "address", "vector", "*/", "ethhdr", "=", "iobuf", "->", "data", ";", "av", "=", "eoib_tx_av", "(", "eoib", ",", "ethhdr", "->", "h_dest", ")", ";", "/*", "Prepend", "EoIB", "header", "*/", "eoib_hdr", "=", "iob_push", "(", "iobuf", ",", "sizeof", "(", "*", "eoib_hdr", ")", ")", ";", "eoib_hdr", "->", "magic", "=", "htons", "(", "EOIB_MAGIC", ")", ";", "eoib_hdr", "->", "reserved", "=", "0", ";", "/*", "Pad", "buffer", "to", "minimum", "Ethernet", "frame", "size", "*/", "zlen", "=", "(", "sizeof", "(", "*", "eoib_hdr", ")", "+", "ETH_ZLEN", ")", ";", "assert", "(", "zlen", "<=", "IOB_ZLEN", ")", ";", "if", "(", "iob_len", "(", "iobuf", ")", "<", "zlen", ")", "iob_pad", "(", "iobuf", ",", "zlen", ")", ";", "/*", "If", "we", "have", "no", "unicast", "address", "then", "send", "as", "a", "broadcast,", "*", "with", "a", "duplicate", "sent", "to", "the", "gateway", "if", "applicable.", "*/", "if", "(", "!", "av", ")", "{", "av", "=", "&", "eoib", "->", "broadcast", ";", "if", "(", "eoib_has_gateway", "(", "eoib", ")", ")", "eoib", "->", "duplicate", "(", "eoib", ",", "iobuf", ")", ";", "}", "/*", "Post", "send", "work", "queue", "entry", "*/", "return", "ib_post_send", "(", "eoib", "->", "ibdev", ",", "eoib", "->", "qp", ",", "av", ",", "iobuf", ")", ";", "}'" ]
eoib_transmit
ipxe/ipxe
multi_line
train
1,007
1,250
[ "Poll", "EoIB", "network", "device" ]
[ "'static", "void", "eoib_poll", "(", "struct", "net_device", "*", "netdev", ")", "{", "struct", "eoib_device", "*", "eoib", "=", "netdev", "->", "priv", ";", "struct", "ib_device", "*", "ibdev", "=", "eoib", "->", "ibdev", ";", "/*", "Poll", "Infiniband", "device", "*/", "ib_poll_eq", "(", "ibdev", ")", ";", "/*", "Poll", "the", "retry", "timers", "(required", "for", "EoIB", "multicast", "join)", "*/", "retry_poll", "()", ";", "}'" ]
eoib_poll
ipxe/ipxe
multi_line
train
1,008
1,251
[ "Handle", "link", "status", "change" ]
[ "'static", "void", "eoib_link_state_changed", "(", "struct", "eoib_device", "*", "eoib", ")", "{", "struct", "net_device", "*", "netdev", "=", "eoib", "->", "netdev", ";", "struct", "ib_device", "*", "ibdev", "=", "eoib", "->", "ibdev", ";", "int", "rc", ";", "/*", "Leave", "existing", "broadcast", "group", "*/", "if", "(", "eoib", "->", "qp", ")", "eoib_leave_broadcast_group", "(", "eoib", ")", ";", "/*", "Update", "broadcast", "GID", "based", "on", "potentially-new", "partition", "key", "*/", "eoib", "->", "broadcast", ".", "gid", ".", "words", "[", "2", "]", "=", "htons", "(", "ibdev", "->", "pkey", "|", "IB_PKEY_FULL", ")", ";", "/*", "Set", "net", "device", "link", "state", "to", "reflect", "Infiniband", "link", "state", "*/", "rc", "=", "ib_link_rc", "(", "ibdev", ")", ";", "netdev_link_err", "(", "netdev", ",", "(", "rc", "?", "rc", ":", "-", "EINPROGRESS_JOINING", ")", ")", ";", "/*", "Join", "new", "broadcast", "group", "*/", "if", "(", "ib_is_open", "(", "ibdev", ")", "&&", "ib_link_ok", "(", "ibdev", ")", "&&", "eoib", "->", "qp", "&&", "(", "(", "rc", "=", "eoib_join_broadcast_group", "(", "eoib", ")", ")", "!=", "0", ")", ")", "{", "DBGC", "(", "eoib", ",", "\"EoIB", "%s", "could", "not", "rejoin", "broadcast", "group:", "\"", "\"%s\\\"", ",", "eoib", "->", "name", ",", "strerror", "(", "rc", ")", ")", ";", "netdev_link_err", "(", "netdev", ",", "rc", ")", ";", "return", ";", "}", "}'" ]
eoib_link_state_changed
ipxe/ipxe
multi_line
train
1,009
1,252
[ "EoIB", "gateway", "Some", "dubious", "EoIB", "implementations", "require", "all", "broadcast", "traffic", "to", "be", "sent", "twice:", "once", "to", "the", "actual", "broadcast", "group,", "and", "once", "as", "a", "unicast", "to", "the", "EoIBtoEthernet", "gateway" ]
[ "'static", "void", "eoib_duplicate", "(", "struct", "eoib_device", "*", "eoib", ",", "struct", "io_buffer", "*", "original", ")", "{", "struct", "net_device", "*", "netdev", "=", "eoib", "->", "netdev", ";", "struct", "ib_device", "*", "ibdev", "=", "eoib", "->", "ibdev", ";", "struct", "ib_address_vector", "*", "av", "=", "&", "eoib", "->", "gateway", ";", "size_t", "len", "=", "iob_len", "(", "original", ")", ";", "struct", "io_buffer", "*", "copy", ";", "int", "rc", ";", "/*", "Create", "copy", "of", "I/O", "buffer", "*/", "copy", "=", "alloc_iob", "(", "len", ")", ";", "if", "(", "!", "copy", ")", "{", "rc", "=", "-", "ENOMEM", ";", "goto", "err_alloc", ";", "}", "memcpy", "(", "iob_put", "(", "copy", ",", "len", ")", ",", "original", "->", "data", ",", "len", ")", ";", "/*", "Append", "to", "network", "device\\'s", "transmit", "queue", "*/", "list_add_tail", "(", "&", "copy", "->", "list", ",", "&", "original", "->", "list", ")", ";", "/*", "Resolve", "path", "to", "gateway", "*/", "if", "(", "(", "rc", "=", "ib_resolve_path", "(", "ibdev", ",", "av", ")", ")", "!=", "0", ")", "{", "DBGC", "(", "eoib", ",", "\"EoIB", "%s", "no", "path", "to", "gateway:", "%s\\\"", ",", "eoib", "->", "name", ",", "strerror", "(", "rc", ")", ")", ";", "goto", "err_path", ";", "}", "/*", "Force", "use", "of", "GRH", "even", "for", "local", "destinations", "*/", "av", "->", "gid_present", "=", "1", ";", "/*", "Post", "send", "work", "queue", "entry", "*/", "if", "(", "(", "rc", "=", "ib_post_send", "(", "eoib", "->", "ibdev", ",", "eoib", "->", "qp", ",", "av", ",", "copy", ")", ")", "!=", "0", ")", "goto", "err_post_send", ";", "return", ";", "err_post_send", ":", "err_path", ":", "list_del", "(", "&", "copy", "->", "list", ")", ";", "err_alloc", ":", "netdev_tx_err", "(", "netdev", ",", "copy", ",", "rc", ")", ";", "}'" ]
eoib_duplicate
ipxe/ipxe
multi_line
train
1,010
1,253
[ "Handle", "EoIB", "broadcast", "multicast", "group", "join", "completion" ]
[ "'static", "void", "eoib_join_complete", "(", "struct", "ib_mc_membership", "*", "membership", ",", "int", "rc", ")", "{", "struct", "eoib_device", "*", "eoib", "=", "container_of", "(", "membership", ",", "struct", "eoib_device", ",", "membership", ")", ";", "/*", "Record", "join", "status", "as", "link", "status", "*/", "netdev_link_err", "(", "eoib", "->", "netdev", ",", "rc", ")", ";", "}'" ]
eoib_join_complete
ipxe/ipxe
multi_line
train
1,011
1,254
[ "Singlestep", "the", "retry", "timer", "list" ]
[ "'static", "void", "retry_step", "(", "struct", "process", "*", "process", "__unused", ")", "{", "retry_poll", "()", ";", "}'" ]
retry_step
ipxe/ipxe
multi_line
train
1,012
1,255
[ "Start", "timer", "with", "a", "specified", "timeout" ]
[ "'void", "start_timer_fixed", "(", "struct", "retry_timer", "*", "timer", ",", "unsigned", "long", "timeout", ")", "{", "/*", "Add", "to", "list", "of", "running", "timers", "(if", "applicable)", "*/", "if", "(", "!", "timer", "->", "running", ")", "{", "list_add", "(", "&", "timer", "->", "list", ",", "&", "timers", ")", ";", "ref_get", "(", "timer", "->", "refcnt", ")", ";", "timer", "->", "running", "=", "1", ";", "}", "/*", "Record", "start", "time", "*/", "timer", "->", "start", "=", "currticks", "()", ";", "/*", "Record", "timeout", "*/", "timer", "->", "timeout", "=", "timeout", ";", "DBGC2", "(", "timer", ",", "\"Timer", "%p", "started", "at", "time", "%ld", "(expires", "at", "%ld)\\\"", ",", "timer", ",", "timer", "->", "start", ",", "(", "timer", "->", "start", "+", "timer", "->", "timeout", ")", ")", ";", "}'" ]
start_timer_fixed
ipxe/ipxe
multi_line
train
1,013
1,274
[ "ioMicroMSecs", "answers", "the", "millisecondClock", "right", "now" ]
[ "'long", "ioMicroMSecs", "(", "void", ")", "{", "return", "microToMilliseconds", "(", "currentUTCMicroseconds", "()", ")", ";", "}'" ]
ioMicroMSecs
OpenSmalltalk/opensmalltalk-vm
single_line
train
1,014
1,275
[ "returns", "the", "local", "wall", "clock", "time" ]
[ "'sqInt", "ioSeconds", "(", "void", ")", "{", "return", "get64", "(", "localMicrosecondClock", ")", "/", "MicrosecondsPerSecond", ";", "}'" ]
ioSeconds
OpenSmalltalk/opensmalltalk-vm
single_line
train
1,015
1,276
[ "ioMSecs", "answers", "the", "millisecondClock", "as", "of", "the", "last", "tick" ]
[ "'long", "ioMSecs", "()", "{", "return", "millisecondClock", ";", "}'" ]
ioMSecs
OpenSmalltalk/opensmalltalk-vm
single_line
train
1,016
1,284
[ "Enable", "or", "disable", "interrupts" ]
[ "'static", "void", "virtnet_irq", "(", "struct", "net_device", "*", "netdev", ",", "int", "enable", ")", "{", "struct", "virtnet_nic", "*", "virtnet", "=", "netdev", "->", "priv", ";", "int", "i", ";", "for", "(", "i", "=", "0", ";", "i", "<", "QUEUE_NB", ";", "i", "++", ")", "{", "if", "(", "enable", ")", "vring_enable_cb", "(", "&", "virtnet", "->", "virtqueue", "[", "i", "]", ")", ";", "else", "vring_disable_cb", "(", "&", "virtnet", "->", "virtqueue", "[", "i", "]", ")", ";", "}", "}'" ]
virtnet_irq
ipxe/ipxe
multi_line
train
1,017
1,285
[ "Try", "to", "keep", "rx", "virtqueue", "filled", "with", "iobufs" ]
[ "'static", "void", "virtnet_refill_rx_virtqueue", "(", "struct", "net_device", "*", "netdev", ")", "{", "struct", "virtnet_nic", "*", "virtnet", "=", "netdev", "->", "priv", ";", "size_t", "len", "=", "(", "netdev", "->", "max_pkt_len", "+", "4", "/*", "VLAN", "*/", ")", ";", "while", "(", "virtnet", "->", "rx_num_iobufs", "<", "NUM_RX_BUF", ")", "{", "struct", "io_buffer", "*", "iobuf", ";", "/*", "Try", "to", "allocate", "a", "buffer,", "stop", "for", "now", "if", "out", "of", "memory", "*/", "iobuf", "=", "alloc_iob", "(", "len", ")", ";", "if", "(", "!", "iobuf", ")", "break;", "/*", "Keep", "track", "of", "iobuf", "so", "close()", "can", "free", "it", "*/", "list_add", "(", "&", "iobuf", "->", "list", ",", "&", "virtnet", "->", "rx_iobufs", ")", ";", "/*", "Mark", "packet", "length", "until", "we", "know", "the", "actual", "size", "*/", "iob_put", "(", "iobuf", ",", "len", ")", ";", "virtnet_enqueue_iob", "(", "netdev", ",", "RX_INDEX", ",", "iobuf", ")", ";", "virtnet", "->", "rx_num_iobufs", "++", ";", "}", "}'" ]
virtnet_refill_rx_virtqueue
ipxe/ipxe
multi_line
train
1,018
1,286
[ "Poll", "for", "completed", "and", "received", "packets" ]
[ "'static", "void", "virtnet_poll", "(", "struct", "net_device", "*", "netdev", ")", "{", "struct", "virtnet_nic", "*", "virtnet", "=", "netdev", "->", "priv", ";", "/*", "Acknowledge", "interrupt.", "This", "is", "necessary", "for", "UNDI", "operation", "and", "*", "interrupts", "that", "are", "raised", "despite", "VRING_AVAIL_F_NO_INTERRUPT", "being", "*", "set", "(that", "flag", "is", "just", "a", "hint", "and", "the", "hypervisor", "does", "not", "have", "to", "*", "honor", "it).", "*/", "if", "(", "virtnet", "->", "virtio_version", ")", "{", "vpm_get_isr", "(", "&", "virtnet", "->", "vdev", ")", ";", "}", "else", "{", "vp_get_isr", "(", "virtnet", "->", "ioaddr", ")", ";", "}", "virtnet_process_tx_packets", "(", "netdev", ")", ";", "virtnet_process_rx_packets", "(", "netdev", ")", ";", "}'" ]
virtnet_poll
ipxe/ipxe
multi_line
train
1,019
1,287
[ "flatten", "datatype", "and", "add", "it", "to", "Flatlist" ]
[ "'void", "ADIOI_Flatten_datatype", "(", "MPI_Datatype", "datatype", ")", "{", "#", "ifdef", "HAVE_MPIR_TYPE_FLATTEN", "MPI_Aint", "flatten_idx", ";", "#", "endif", "MPI_Count", "curr_index", "=", "0", ";", "int", "is_contig", ";", "ADIOI_Flatlist_node", "*", "flat", ",", "<type", "ref=\"prev\">", "*", "prev", "=", "0", ";", "/*", "check", "if", "necessary", "to", "flatten.", "*/", "/*", "is", "it", "entirely", "contiguous?", "*/", "ADIOI_Datatype_iscontig", "(", "datatype", ",", "&", "is_contig", ")", ";", "#", "ifdef", "FLATTEN_DEBUG", "DBG_FPRINTF", "(", "stderr", ",", "\"ADIOI_Flatten_datatype::", "is_contig", "%#X\\\"", ",", "is_contig", ")", ";", "#", "endif", "if", "(", "is_contig", ")", "return", ";", "/*", "has", "it", "already", "been", "flattened?", "*/", "flat", "=", "ADIOI_Flatlist", ";", "while", "(", "flat", ")", "{", "if", "(", "flat", "->", "type", "==", "datatype", ")", "{", "#", "ifdef", "FLATTEN_DEBUG", "DBG_FPRINTF", "(", "stderr", ",", "\"ADIOI_Flatten_datatype::", "found", "datatype", "%#X\\\"", ",", "datatype", ")", ";", "#", "endif", "return", ";", "}", "else", "{", "prev", "=", "flat", ";", "flat", "=", "flat", "->", "next", ";", "}", "}", "/*", "flatten", "and", "add", "to", "the", "list", "*/", "flat", "=", "prev", ";", "flat", "->", "next", "=", "(", "ADIOI_Flatlist_node", "*", ")", "ADIOI_Malloc", "(", "sizeof", "(", "ADIOI_Flatlist_node", ")", ")", ";", "flat", "=", "flat", "->", "next", ";", "flat", "->", "type", "=", "datatype", ";", "flat", "->", "next", "=", "NULL", ";", "flat", "->", "blocklens", "=", "NULL", ";", "flat", "->", "indices", "=", "NULL", ";", "flat", "->", "lb_idx", "=", "flat", "->", "ub_idx", "=", "-", "1", ";", "flat", "->", "count", "=", "ADIOI_Count_contiguous_blocks", "(", "datatype", ",", "&", "curr_index", ")", ";", "#", "ifdef", "FLATTEN_DEBUG", "DBG_FPRINTF", "(", "stderr", ",", "\"ADIOI_Flatten_datatype::", "count", "%llX,", "cur_idx", "=", "%#llX\\\"", ",", "flat", "->", "count", ",", "curr_index", ")", ";", "#", "endif", "/*", "DBG_FPRINTF(stderr,", "\"%d\\\",", "flat->count);*/", "if", "(", "flat", "->", "count", ")", "{", "flat", "->", "blocklens", "=", "(", "ADIO_Offset", "*", ")", "ADIOI_Malloc", "(", "flat", "->", "count", "*", "sizeof", "(", "ADIO_Offset", ")", ")", ";", "flat", "->", "indices", "=", "(", "ADIO_Offset", "*", ")", "ADIOI_Malloc", "(", "flat", "->", "count", "*", "sizeof", "(", "ADIO_Offset", ")", ")", ";", "}", "curr_index", "=", "0", ";", "#", "ifdef", "HAVE_MPIR_TYPE_FLATTEN", "flatten_idx", "=", "(", "MPI_Aint", ")", "flat", "->", "count", ";", "MPIR_Type_flatten", "(", "datatype", ",", "flat", "->", "indices", ",", "flat", "->", "blocklens", ",", "&", "flatten_idx", ")", ";", "#", "ifdef", "FLATTEN_DEBUG", "DBG_FPRINTF", "(", "stderr", ",", "\"ADIOI_Flatten_datatype::", "MPIR_Type_flatten\\\"", ")", ";", "#", "endif", "#", "else", "ADIOI_Flatten", "(", "datatype", ",", "flat", ",", "0", ",", "&", "curr_index", ")", ";", "#", "ifdef", "FLATTEN_DEBUG", "DBG_FPRINTF", "(", "stderr", ",", "\"ADIOI_Flatten_datatype::", "ADIOI_Flatten\\\"", ")", ";", "#", "endif", "ADIOI_Optimize_flattened", "(", "flat", ")", ";", "#", "endif", "/*", "debug", "*/", "#", "ifdef", "FLATTEN_DEBUG", "{", "int", "i", ";", "for", "(", "i", "=", "0", ";", "i", "<", "flat", "->", "count", ";", "i", "++", ")", "DBG_FPRINTF", "(", "stderr", ",", "\"ADIOI_Flatten_datatype::", "i", "%#X,", "blocklens", "%#llX,", "indices", "%#llX\\\"", ",", "i", ",", "flat", "->", "blocklens", "[", "i", "]", ",", "flat", "->", "indices", "[", "i", "]", ")", ";", "}", "#", "endif", "}'" ]
ADIOI_Flatten_datatype
GlobalArrays/ga
single_line
train
1,020
1,288
[ "Enable", "the", "Timer", "for", "One", "Cycle", "and", "Stop" ]
[ "'void", "timer_one_shot_mode", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_CR1", "(", "timer_peripheral", ")", "|=", "TIM_CR1_OPM", ";", "}'" ]
timer_one_shot_mode
im-tomu/tomu-samples
multi_line
train
1,021
1,289
[ "Set", "the", "Timer", "to", "Count", "Down" ]
[ "'void", "timer_direction_down", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_CR1", "(", "timer_peripheral", ")", "|=", "TIM_CR1_DIR_DOWN", ";", "}'" ]
timer_direction_down
im-tomu/tomu-samples
multi_line
train
1,022
1,290
[ "Enable", "the", "timer", "to", "start", "counting" ]
[ "'void", "timer_enable_counter", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_CR1", "(", "timer_peripheral", ")", "|=", "TIM_CR1_CEN", ";", "}'" ]
timer_enable_counter
im-tomu/tomu-samples
multi_line
train
1,023
1,291
[ "Disable", "Timer", "Update", "Events" ]
[ "'void", "timer_disable_update_event", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_CR1", "(", "timer_peripheral", ")", "|=", "TIM_CR1_UDIS", ";", "}'" ]
timer_disable_update_event
im-tomu/tomu-samples
multi_line
train
1,024
1,292
[ "Stop", "the", "timer", "from", "counting" ]
[ "'void", "timer_disable_counter", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_CR1", "(", "timer_peripheral", ")", "&=", "~", "TIM_CR1_CEN", ";", "}'" ]
timer_disable_counter
im-tomu/tomu-samples
multi_line
train
1,025
1,293
[ "Enable", "OffState", "in", "Idle", "Mode" ]
[ "'void", "timer_set_enabled_off_state_in_idle_mode", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_BDTR", "(", "timer_peripheral", ")", "|=", "TIM_BDTR_OSSI", ";", "}'" ]
timer_set_enabled_off_state_in_idle_mode
im-tomu/tomu-samples
multi_line
train
1,026
1,294
[ "Disable", "Timer", "Input", "Capture" ]
[ "'void", "timer_ic_disable", "(", "uint32_t", "timer_peripheral", ",", "enum", "tim_ic_id", "ic", ")", "{", "TIM_CCER", "(", "timer_peripheral", ")", "&=", "~", "(", "0x1", "<<", "(", "ic", "*", "4", ")", ")", ";", "}'" ]
timer_ic_disable
im-tomu/tomu-samples
multi_line
train
1,027
1,295
[ "Set", "the", "Timer", "to", "Generate", "Update", "IRQ", "or", "DMA", "on", "any", "Event" ]
[ "'void", "timer_update_on_any", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_CR1", "(", "timer_peripheral", ")", "&=", "~", "TIM_CR1_URS", ";", "}'" ]
timer_update_on_any
im-tomu/tomu-samples
multi_line
train
1,028
1,296
[ "Set", "the", "Value", "for", "the", "Timer", "Repetition", "Counter" ]
[ "'void", "timer_set_repetition_counter", "(", "uint32_t", "timer_peripheral", ",", "uint32_t", "value", ")", "{", "TIM_RCR", "(", "timer_peripheral", ")", "=", "value", ";", "}'" ]
timer_set_repetition_counter
im-tomu/tomu-samples
multi_line
train
1,029
1,297
[ "Enable", "the", "Timer", "to", "Run", "Continuously" ]
[ "'void", "timer_continuous_mode", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_CR1", "(", "timer_peripheral", ")", "&=", "~", "TIM_CR1_OPM", ";", "}'" ]
timer_continuous_mode
im-tomu/tomu-samples
multi_line
train
1,030
1,298
[ "Disable", "Timer", "Capture", "Compare", "Control", "Preload" ]
[ "'void", "timer_disable_preload_complementry_enable_bits", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_CR2", "(", "timer_peripheral", ")", "&=", "~", "TIM_CR2_CCPC", ";", "}'" ]
timer_disable_preload_complementry_enable_bits
im-tomu/tomu-samples
multi_line
train
1,031
1,299
[ "Set", "the", "Timer", "to", "Count", "Up" ]
[ "'void", "timer_direction_up", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_CR1", "(", "timer_peripheral", ")", "&=", "~", "TIM_CR1_DIR_DOWN", ";", "}'" ]
timer_direction_up
im-tomu/tomu-samples
multi_line
train
1,032
1,300
[ "Set", "Timer", "Output", "Idle", "States", "High" ]
[ "'void", "timer_set_output_idle_state", "(", "uint32_t", "timer_peripheral", ",", "uint32_t", "outputs", ")", "{", "TIM_CR2", "(", "timer_peripheral", ")", "|=", "outputs", "&", "TIM_CR2_OIS_MASK", ";", "}'" ]
timer_set_output_idle_state
im-tomu/tomu-samples
multi_line
train
1,033
1,301
[ "Enable", "Timer", "Update", "Events" ]
[ "'void", "timer_enable_update_event", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_CR1", "(", "timer_peripheral", ")", "&=", "~", "TIM_CR1_UDIS", ";", "}'" ]
timer_enable_update_event
im-tomu/tomu-samples
multi_line
train
1,034
1,302
[ "Activate", "Break", "when", "Input", "High" ]
[ "'void", "timer_set_break_polarity_high", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_BDTR", "(", "timer_peripheral", ")", "|=", "TIM_BDTR_BKP", ";", "}'" ]
timer_set_break_polarity_high
im-tomu/tomu-samples
multi_line
train
1,035
1,303
[ "Enable", "Output", "in", "Break" ]
[ "'void", "timer_enable_break_main_output", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_BDTR", "(", "timer_peripheral", ")", "|=", "TIM_BDTR_MOE", ";", "}'" ]
timer_enable_break_main_output
im-tomu/tomu-samples
multi_line
train
1,036
1,304
[ "Set", "the", "Timer", "to", "Generate", "Update", "IRQ", "or", "DMA", "only", "from", "Under", "Overflow" ]
[ "'void", "timer_update_on_overflow", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_CR1", "(", "timer_peripheral", ")", "|=", "TIM_CR1_URS", ";", "}'" ]
timer_update_on_overflow
im-tomu/tomu-samples
multi_line
train
1,037
1,305
[ "Enable", "Timer", "Capture", "Compare", "Control", "Preload" ]
[ "'void", "timer_enable_preload_complementry_enable_bits", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_CR2", "(", "timer_peripheral", ")", "|=", "TIM_CR2_CCPC", ";", "}'" ]
timer_enable_preload_complementry_enable_bits
im-tomu/tomu-samples
multi_line
train
1,038
1,306
[ "Enable", "Automatic", "Output", "in", "Break" ]
[ "'void", "timer_enable_break_automatic_output", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_BDTR", "(", "timer_peripheral", ")", "|=", "TIM_BDTR_AOE", ";", "}'" ]
timer_enable_break_automatic_output
im-tomu/tomu-samples
multi_line
train
1,039
1,307
[ "Enable", "OffState", "in", "Run", "Mode" ]
[ "'void", "timer_set_enabled_off_state_in_run_mode", "(", "uint32_t", "timer_peripheral", ")", "{", "TIM_BDTR", "(", "timer_peripheral", ")", "|=", "TIM_BDTR_OSSR", ";", "}'" ]
timer_set_enabled_off_state_in_run_mode
im-tomu/tomu-samples
multi_line
train
1,040
1,308
[ "Convert", "RRDtool", "info", "to", "dict" ]
[ "'static", "PyObject", "*", "_rrdtool_util_info2dict", "(", "const", "rrd_info_t", "*", "data", ")", "{", "PyObject", "*", "dict", ",", "<type", "ref=\"prev\">", "*", "val", ";", "dict", "=", "PyDict_New", "()", ";", "while", "(", "data", ")", "{", "val", "=", "NULL", ";", "switch", "(", "data", "->", "type", ")", "{", "case", "RD_I_VAL", ":", "if", "(", "isnan", "(", "data", "->", "value", ".", "u_val", ")", ")", "{", "Py_INCREF", "(", "Py_None", ")", ";", "val", "=", "Py_None", ";", "}", "else", "val", "=", "PyFloat_FromDouble", "(", "data", "->", "value", ".", "u_val", ")", ";", "break;", "case", "RD_I_CNT", ":", "val", "=", "PyLong_FromUnsignedLong", "(", "data", "->", "value", ".", "u_cnt", ")", ";", "break;", "case", "RD_I_INT", ":", "val", "=", "PyLong_FromLong", "(", "data", "->", "value", ".", "u_int", ")", ";", "break;", "case", "RD_I_STR", ":", "val", "=", "PyRRD_String_FromString", "(", "data", "->", "value", ".", "u_str", ")", ";", "break;", "case", "RD_I_BLO", ":", "val", "=", "PyRRD_String_FromStringAndSize", "(", "(", "char", "*", ")", "data", "->", "value", ".", "u_blo", ".", "ptr", ",", "data", "->", "value", ".", "u_blo", ".", "size", ")", ";", "break;", "default:", "break;", "}", "if", "(", "val", "!=", "NULL", ")", "{", "PyDict_SetItemString", "(", "dict", ",", "data", "->", "key", ",", "val", ")", ";", "Py_DECREF", "(", "val", ")", ";", "}", "data", "=", "data", "->", "next", ";", "}", "return", "dict", ";", "}'" ]
_rrdtool_util_info2dict
oetiker/rrdtool-1.x
multi_line
train
1,041
1,309
[ "for", "SymInitialize,", "SymLoadModuleEx,", "etc" ]
[ "'int", "locate_libR_globals", "(", "phandle", "pid", ",", "struct", "libR_globals", "*", "out", ")", "{", "if", "(", "proc_suspend", "(", "pid", ")", "<", "0", ")", "{", "return", "-", "1", ";", "}", "/*", "TODO:", "Should", "we", "use", "TRUE", "here", "to", "force", "loading", "symbols", "from", "all", "modules?", "*/", "if", "(", "!", "SymInitialize", "(", "pid", ",", "NULL", ",", "FALSE", ")", ")", "{", "fprintf", "(", "stderr", ",", "\"error:", "Failed", "to", "load", "remote", "process", "symbols:", "%ld.\\\"", ",", "GetLastError", "()", ")", ";", "return", "-", "1", ";", "}", "HMODULE", "mods", "[", "1024", "]", ";", "DWORD", "mod_bytes", ";", "if", "(", "!", "EnumProcessModules", "(", "pid", ",", "mods", ",", "sizeof", "(", "mods", ")", ",", "&", "mod_bytes", ")", ")", "{", "fprintf", "(", "stderr", ",", "\"error:", "Failed", "to", "enumerate", "remote", "process", "modules:", "%ld.\\\"", ",", "GetLastError", "()", ")", ";", "goto", "error", ";", "}", "int", "entries", "=", "mod_bytes", "/", "sizeof", "(", "HMODULE", ")", ";", "TCHAR", "mpath", "[", "256", "]", ";", "DWORD64", "base", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "entries", ";", "i", "++", ")", "{", "if", "(", "!", "GetModuleFileNameEx", "(", "pid", ",", "mods", "[", "i", "]", ",", "mpath", ",", "sizeof", "(", "mpath", ")", "/", "sizeof", "(", "TCHAR", ")", ")", ")", "{", "fprintf", "(", "stderr", ",", "\"error:", "Failed", "to", "get", "remote", "process", "module:", "%ld.\\\"", ",", "GetLastError", "()", ")", ";", "goto", "error", ";", "}", "/*", "A", "module", "that", "looks", "like", "R.", "*/", "if", "(", "!", "strstr", "(", "mpath", ",", "\"R.dll\"", ")", ")", "{", "continue;", "}", "base", "=", "SymLoadModuleEx", "(", "pid", ",", "NULL", ",", "mpath", ",", "NULL", ",", "(", "DWORD64", ")", "mods", "[", "i", "]", ",", "0", ",", "NULL", ",", "0", ")", ";", "if", "(", "!", "base", ")", "{", "fprintf", "(", "stderr", ",", "\"error:", "Failed", "to", "load", "symbols", "for", "%s", "(0x%p):", "%ld.\\\"", ",", "mpath", ",", "mods", "[", "i", "]", ",", "GetLastError", "()", ")", ";", "goto", "error", ";", "}", "uintptr_t", "value", ";", "size_t", "bytes", ";", "/*", "This", "is", "actually", "the", "crazy", "structure", "SymFromName", "uses.", "*/", "struct", "{", "SYMBOL_INFO", "info", ";", "char", "buf", "[", "MAX_SYM_NAME", "]", ";", "}", "info", ";", "info", ".", "info", ".", "SizeOfStruct", "=", "sizeof", "(", "SYMBOL_INFO", ")", ";", "info", ".", "info", ".", "ModBase", "=", "base", ";", "info", ".", "info", ".", "MaxNameLen", "=", "MAX_SYM_NAME", "-", "1", ";", "char", "*", "sym", ";", "sym", "=", "\"R_GlobalContext\"", ";", "if", "(", "!", "SymFromName", "(", "pid", ",", "sym", ",", "&", "info", ".", "info", ")", ")", "{", "if", "(", "GetLastError", "()", "!=", "123", ")", "{", "fprintf", "(", "stderr", ",", "\"error:", "Failed", "to", "lookup", "symbol:", "%ld.\\\"", ",", "GetLastError", "()", ")", ";", "goto", "error", ";", "}", "}", "else", "{", "out", "->", "context_addr", "=", "info", ".", "info", ".", "Address", ";", "}", "sym", "=", "\"R_DoubleColonSymbol\"", ";", "if", "(", "!", "SymFromName", "(", "pid", ",", "sym", ",", "&", "info", ".", "info", ")", ")", "{", "if", "(", "GetLastError", "()", "!=", "123", ")", "{", "fprintf", "(", "stderr", ",", "\"error:", "Failed", "to", "lookup", "symbol:", "%ld.\\\"", ",", "GetLastError", "()", ")", ";", "goto", "error", ";", "}", "}", "else", "{", "/*", "copy_address()", "will", "print", "its", "own", "errors.", "*/", "bytes", "=", "copy_address", "(", "pid", ",", "(", "void", "*", ")", "info", ".", "info", ".", "Address", ",", "&", "value", ",", "sizeof", "(", "uintptr_t", ")", ")", ";", "out", "->", "doublecolon", "=", "bytes", "<", "sizeof", "(", "uintptr_t", ")", "?", "0", ":", "value", ";", "}", "sym", "=", "\"R_TripleColonSymbol\"", ";", "if", "(", "!", "SymFromName", "(", "pid", ",", "sym", ",", "&", "info", ".", "info", ")", ")", "{", "if", "(", "GetLastError", "()", "!=", "123", ")", "{", "fprintf", "(", "stderr", ",", "\"error:", "Failed", "to", "lookup", "symbol:", "%ld.\\\"", ",", "GetLastError", "()", ")", ";", "goto", "error", ";", "}", "}", "else", "{", "bytes", "=", "copy_address", "(", "pid", ",", "(", "void", "*", ")", "info", ".", "info", ".", "Address", ",", "&", "value", ",", "sizeof", "(", "uintptr_t", ")", ")", ";", "out", "->", "triplecolon", "=", "bytes", "<", "sizeof", "(", "uintptr_t", ")", "?", "0", ":", "value", ";", "}", "sym", "=", "\"R_DollarSymbol\"", ";", "if", "(", "!", "SymFromName", "(", "pid", ",", "sym", ",", "&", "info", ".", "info", ")", ")", "{", "if", "(", "GetLastError", "()", "!=", "123", ")", "{", "fprintf", "(", "stderr", ",", "\"error:", "Failed", "to", "lookup", "symbol:", "%ld.\\\"", ",", "GetLastError", "()", ")", ";", "goto", "error", ";", "}", "}", "else", "{", "bytes", "=", "copy_address", "(", "pid", ",", "(", "void", "*", ")", "info", ".", "info", ".", "Address", ",", "&", "value", ",", "sizeof", "(", "uintptr_t", ")", ")", ";", "out", "->", "dollar", "=", "bytes", "<", "sizeof", "(", "uintptr_t", ")", "?", "0", ":", "value", ";", "}", "sym", "=", "\"R_BracketSymbol\"", ";", "if", "(", "!", "SymFromName", "(", "pid", ",", "sym", ",", "&", "info", ".", "info", ")", ")", "{", "if", "(", "GetLastError", "()", "!=", "123", ")", "{", "fprintf", "(", "stderr", ",", "\"error:", "Failed", "to", "lookup", "symbol:", "%ld.\\\"", ",", "GetLastError", "()", ")", ";", "goto", "error", ";", "}", "}", "else", "{", "bytes", "=", "copy_address", "(", "pid", ",", "(", "void", "*", ")", "info", ".", "info", ".", "Address", ",", "&", "value", ",", "sizeof", "(", "uintptr_t", ")", ")", ";", "out", "->", "bracket", "=", "bytes", "<", "sizeof", "(", "uintptr_t", ")", "?", "0", ":", "value", ";", "}", "if", "(", "!", "SymUnloadModule64", "(", "pid", ",", "base", ")", ")", "{", "fprintf", "(", "stderr", ",", "\"error:", "Failed", "to", "unload", "symbols", "for", "%s", "(0x%p):", "%ld.\\\"", ",", "mpath", ",", "mods", "[", "i", "]", ",", "GetLastError", "()", ")", ";", "goto", "error", ";", "}", "}", "if", "(", "!", "out", "->", "doublecolon", "||", "!", "out", "->", "triplecolon", "||", "!", "out", "->", "dollar", "||", "!", "out", "->", "bracket", "||", "!", "out", "->", "context_addr", ")", "{", "fprintf", "(", "stderr", ",", "\"error:", "Failed", "to", "locate", "required", "R", "global", "variables", "in", "\\\\", "remote", "process\\'s", "memory.", "Are", "you", "sure", "it", "is", "an", "R", "program?\\\"", ")", ";", "goto", "error", ";", "}", "SymCleanup", "(", "pid", ")", ";", "return", "proc_resume", "(", "pid", ")", ";", "error", ":", "SymCleanup", "(", "pid", ")", ";", "proc_resume", "(", "pid", ")", ";", "return", "-", "1", ";", "}'" ]
locate_libR_globals
atheriel/xrprof
single_line
train
1,042
1,310
[ "Destroys", "a", "global", "heap", "collection", "in", "memory" ]
[ "'herr_t", "H5HG_free", "(", "H5HG_heap_t", "*", "heap", ")", "{", "herr_t", "ret_value", "=", "SUCCEED", ";", "/*", "Return", "value", "*/", "FUNC_ENTER_NOAPI", "(", "FAIL", ")", "/*", "Check", "arguments", "*/", "HDassert", "(", "heap", ")", ";", "/*", "Remove", "the", "heap", "from", "the", "CWFS", "list", "*/", "if", "(", "H5F_cwfs_remove_heap", "(", "heap", "->", "shared", ",", "heap", ")", "<", "0", ")", "HGOTO_ERROR", "(", "H5E_HEAP", ",", "H5E_CANTREMOVE", ",", "FAIL", ",", "\"can\\'t", "remove", "heap", "from", "file\\'s", "CWFS\"", ")", "if", "(", "heap", "->", "chunk", ")", "heap", "->", "chunk", "=", "H5FL_BLK_FREE", "(", "gheap_chunk", ",", "heap", "->", "chunk", ")", ";", "if", "(", "heap", "->", "obj", ")", "heap", "->", "obj", "=", "H5FL_SEQ_FREE", "(", "H5HG_obj_t", ",", "heap", "->", "obj", ")", ";", "heap", "=", "H5FL_FREE", "(", "H5HG_heap_t", ",", "heap", ")", ";", "done", ":", "FUNC_LEAVE_NOAPI", "(", "ret_value", ")", "}'" ]
H5HG_free
gsjaardema/seacas
multi_line
train
1,043
1,311
[ "A", "new", "object", "is", "inserted", "into", "the", "global", "heap" ]
[ "'herr_t", "H5HG_insert", "(", "H5F_t", "*", "f", ",", "size_t", "size", ",", "void", "*", "obj", ",", "H5HG_t", "*", "hobj", "/*out*/", ")", "{", "size_t", "need", ";", "/*total", "space", "needed", "for", "object", "*/", "size_t", "idx", ";", "haddr_t", "addr", ";", "/*", "Address", "of", "heap", "to", "add", "object", "within", "*/", "H5HG_heap_t", "*", "heap", "=", "NULL", ";", "unsigned", "heap_flags", "=", "H5AC__NO_FLAGS_SET", ";", "herr_t", "ret_value", "=", "SUCCEED", ";", "/*", "Return", "value", "*/", "FUNC_ENTER_NOAPI_TAG", "(", "H5AC__GLOBALHEAP_TAG", ",", "FAIL", ")", "/*", "Check", "args", "*/", "HDassert", "(", "f", ")", ";", "HDassert", "(", "0", "==", "size", "||", "obj", ")", ";", "HDassert", "(", "hobj", ")", ";", "if", "(", "0", "==", "(", "H5F_INTENT", "(", "f", ")", "&", "H5F_ACC_RDWR", ")", ")", "HGOTO_ERROR", "(", "H5E_HEAP", ",", "H5E_WRITEERROR", ",", "FAIL", ",", "\"no", "write", "intent", "on", "file\"", ")", "/*", "Find", "a", "large", "enough", "collection", "on", "the", "CWFS", "list", "*/", "need", "=", "H5HG_SIZEOF_OBJHDR", "(", "f", ")", "+", "H5HG_ALIGN", "(", "size", ")", ";", "/*", "Look", "for", "a", "heap", "in", "the", "file\\'s", "CWFS", "that", "has", "enough", "space", "for", "the", "object", "*/", "addr", "=", "HADDR_UNDEF", ";", "if", "(", "H5F_cwfs_find_free_heap", "(", "f", ",", "need", ",", "&", "addr", ")", "<", "0", ")", "HGOTO_ERROR", "(", "H5E_HEAP", ",", "H5E_NOTFOUND", ",", "FAIL", ",", "\"error", "trying", "to", "locate", "heap\"", ")", "/*", "*", "If", "we", "didn\\'t", "find", "any", "collection", "with", "enough", "free", "space", "then", "allocate", "a", "*", "new", "collection", "large", "enough", "for", "the", "message", "plus", "the", "collection", "header.", "*/", "if", "(", "!", "H5F_addr_defined", "(", "addr", ")", ")", "{", "addr", "=", "H5HG__create", "(", "f", ",", "need", "+", "H5HG_SIZEOF_HDR", "(", "f", ")", ")", ";", "if", "(", "!", "H5F_addr_defined", "(", "addr", ")", ")", "HGOTO_ERROR", "(", "H5E_HEAP", ",", "H5E_CANTINIT", ",", "FAIL", ",", "\"unable", "to", "allocate", "a", "global", "heap", "collection\"", ")", "}", "/*", "end", "if", "*/", "HDassert", "(", "H5F_addr_defined", "(", "addr", ")", ")", ";", "if", "(", "NULL", "==", "(", "heap", "=", "H5HG__protect", "(", "f", ",", "addr", ",", "H5AC__NO_FLAGS_SET", ")", ")", ")", "HGOTO_ERROR", "(", "H5E_HEAP", ",", "H5E_CANTPROTECT", ",", "FAIL", ",", "\"unable", "to", "protect", "global", "heap\"", ")", "/*", "Split", "the", "free", "space", "to", "make", "room", "for", "the", "new", "object", "*/", "if", "(", "0", "==", "(", "idx", "=", "H5HG_alloc", "(", "f", ",", "heap", ",", "size", ",", "&", "heap_flags", ")", ")", ")", "HGOTO_ERROR", "(", "H5E_HEAP", ",", "H5E_CANTALLOC", ",", "FAIL", ",", "\"unable", "to", "allocate", "global", "heap", "object\"", ")", "/*", "Copy", "data", "into", "the", "heap", "*/", "if", "(", "size", ">", "0", ")", "{", "HDmemcpy", "(", "heap", "->", "obj", "[", "idx", "]", ".", "begin", "+", "H5HG_SIZEOF_OBJHDR", "(", "f", ")", ",", "obj", ",", "size", ")", ";", "#", "ifdef", "OLD_WAY", "/*", "Don\\'t", "bother", "zeroing", "out", "the", "rest", "of", "the", "info", "in", "the", "heap", "-QAK", "*/", "HDmemset", "(", "heap", "->", "obj", "[", "idx", "]", ".", "begin", "+", "H5HG_SIZEOF_OBJHDR", "(", "f", ")", "+", "size", ",", "0", ",", "need", "-", "(", "H5HG_SIZEOF_OBJHDR", "(", "f", ")", "+", "size", ")", ")", ";", "#", "endif", "/*", "OLD_WAY", "*/", "}", "/*", "end", "if", "*/", "heap_flags", "|=", "H5AC__DIRTIED_FLAG", ";", "/*", "Return", "value", "*/", "hobj", "->", "addr", "=", "heap", "->", "addr", ";", "hobj", "->", "idx", "=", "idx", ";", "done", ":", "if", "(", "heap", "&&", "H5AC_unprotect", "(", "f", ",", "H5AC_GHEAP", ",", "heap", "->", "addr", ",", "heap", ",", "heap_flags", ")", "<", "0", ")", "HDONE_ERROR", "(", "H5E_HEAP", ",", "H5E_CANTUNPROTECT", ",", "FAIL", ",", "\"unable", "to", "unprotect", "heap.\"", ")", "FUNC_LEAVE_NOAPI_TAG", "(", "ret_value", ")", "}'" ]
H5HG_insert
gsjaardema/seacas
multi_line
train
1,044
1,312
[ "Extend", "a", "heap", "to", "hold", "an", "object", "of", "SIZE", "bytes" ]
[ "'herr_t", "H5HG_extend", "(", "H5F_t", "*", "f", ",", "haddr_t", "addr", ",", "size_t", "need", ")", "{", "H5HG_heap_t", "*", "heap", "=", "NULL", ";", "/*", "Pointer", "to", "heap", "to", "extend", "*/", "unsigned", "heap_flags", "=", "H5AC__NO_FLAGS_SET", ";", "/*", "Flags", "to", "unprotecting", "heap", "*/", "size_t", "old_size", ";", "/*", "Previous", "size", "of", "the", "heap\\'s", "chunk", "*/", "uint8_t", "*", "new_chunk", ";", "/*", "Pointer", "to", "new", "chunk", "information", "*/", "uint8_t", "*", "p", ";", "/*", "Pointer", "to", "raw", "heap", "info", "*/", "unsigned", "u", ";", "/*", "Local", "index", "variable", "*/", "herr_t", "ret_value", "=", "SUCCEED", ";", "/*", "Return", "value", "*/", "FUNC_ENTER_NOAPI_NOINIT", "/*", "Check", "args", "*/", "HDassert", "(", "f", ")", ";", "HDassert", "(", "H5F_addr_defined", "(", "addr", ")", ")", ";", "/*", "Protect", "the", "heap", "*/", "if", "(", "NULL", "==", "(", "heap", "=", "H5HG__protect", "(", "f", ",", "addr", ",", "H5AC__NO_FLAGS_SET", ")", ")", ")", "HGOTO_ERROR", "(", "H5E_HEAP", ",", "H5E_CANTPROTECT", ",", "FAIL", ",", "\"unable", "to", "protect", "global", "heap\"", ")", "/*", "Re-allocate", "the", "heap", "information", "in", "memory", "*/", "if", "(", "NULL", "==", "(", "new_chunk", "=", "H5FL_BLK_REALLOC", "(", "gheap_chunk", ",", "heap", "->", "chunk", ",", "(", "heap", "->", "size", "+", "need", ")", ")", ")", ")", "HGOTO_ERROR", "(", "H5E_RESOURCE", ",", "H5E_NOSPACE", ",", "FAIL", ",", "\"new", "heap", "allocation", "failed\"", ")", "HDmemset", "(", "new_chunk", "+", "heap", "->", "size", ",", "0", ",", "need", ")", ";", "/*", "Adjust", "the", "size", "of", "the", "heap", "*/", "old_size", "=", "heap", "->", "size", ";", "heap", "->", "size", "+=", "need", ";", "/*", "Encode", "the", "new", "size", "of", "the", "heap", "*/", "p", "=", "new_chunk", "+", "H5_SIZEOF_MAGIC", "+", "1", "/*", "version", "*/", "+", "3", "/*", "reserved", "*/", ";", "H5F_ENCODE_LENGTH", "(", "f", ",", "p", ",", "heap", "->", "size", ")", ";", "/*", "Move", "the", "pointers", "to", "the", "existing", "objects", "to", "their", "new", "locations", "*/", "for", "(", "u", "=", "0", ";", "u", "<", "heap", "->", "nused", ";", "u", "++", ")", "if", "(", "heap", "->", "obj", "[", "u", "]", ".", "begin", ")", "heap", "->", "obj", "[", "u", "]", ".", "begin", "=", "new_chunk", "+", "(", "heap", "->", "obj", "[", "u", "]", ".", "begin", "-", "heap", "->", "chunk", ")", ";", "/*", "Update", "the", "heap", "chunk", "pointer", "now", "*/", "heap", "->", "chunk", "=", "new_chunk", ";", "/*", "Update", "the", "free", "space", "information", "for", "the", "heap", "*/", "heap", "->", "obj", "[", "0", "]", ".", "size", "+=", "need", ";", "if", "(", "heap", "->", "obj", "[", "0", "]", ".", "begin", "==", "NULL", ")", "heap", "->", "obj", "[", "0", "]", ".", "begin", "=", "heap", "->", "chunk", "+", "old_size", ";", "p", "=", "heap", "->", "obj", "[", "0", "]", ".", "begin", ";", "UINT16ENCODE", "(", "p", ",", "0", ")", ";", "/*id*/", "UINT16ENCODE", "(", "p", ",", "0", ")", ";", "/*nrefs*/", "UINT32ENCODE", "(", "p", ",", "0", ")", ";", "/*reserved*/", "H5F_ENCODE_LENGTH", "(", "f", ",", "p", ",", "heap", "->", "obj", "[", "0", "]", ".", "size", ")", ";", "HDassert", "(", "H5HG_ISALIGNED", "(", "heap", "->", "obj", "[", "0", "]", ".", "size", ")", ")", ";", "/*", "Resize", "the", "heap", "in", "the", "cache", "*/", "if", "(", "H5AC_resize_entry", "(", "heap", ",", "heap", "->", "size", ")", "<", "0", ")", "HGOTO_ERROR", "(", "H5E_HEAP", ",", "H5E_CANTRESIZE", ",", "FAIL", ",", "\"unable", "to", "resize", "global", "heap", "in", "cache\"", ")", "/*", "Mark", "the", "heap", "as", "dirty", "*/", "heap_flags", "|=", "H5AC__DIRTIED_FLAG", ";", "done", ":", "if", "(", "heap", "&&", "H5AC_unprotect", "(", "f", ",", "H5AC_GHEAP", ",", "heap", "->", "addr", ",", "heap", ",", "heap_flags", ")", "<", "0", ")", "HDONE_ERROR", "(", "H5E_HEAP", ",", "H5E_CANTUNPROTECT", ",", "FAIL", ",", "\"unable", "to", "unprotect", "heap\"", ")", "FUNC_LEAVE_NOAPI", "(", "ret_value", ")", "}'" ]
H5HG_extend
gsjaardema/seacas
multi_line
train
1,045
1,313
[ "Convenience", "wrapper", "around", "H5AC_protect", "on", "an", "indirect", "block" ]
[ "'H5HG_heap_t", "*", "H5HG__protect", "(", "H5F_t", "*", "f", ",", "haddr_t", "addr", ",", "unsigned", "flags", ")", "{", "H5HG_heap_t", "*", "heap", ";", "/*", "Global", "heap", "*/", "H5HG_heap_t", "*", "ret_value", "=", "NULL", ";", "/*", "Return", "value", "*/", "FUNC_ENTER_PACKAGE", "/*", "Check", "arguments", "*/", "HDassert", "(", "f", ")", ";", "HDassert", "(", "H5F_addr_defined", "(", "addr", ")", ")", ";", "/*", "only", "H5AC__READ_ONLY_FLAG", "may", "appear", "in", "flags", "*/", "HDassert", "(", "(", "flags", "&", "(", "unsigned", ")", "(", "~", "H5AC__READ_ONLY_FLAG", ")", ")", "==", "0", ")", ";", "/*", "Lock", "the", "heap", "into", "memory", "*/", "if", "(", "NULL", "==", "(", "heap", "=", "(", "H5HG_heap_t", "*", ")", "H5AC_protect", "(", "f", ",", "H5AC_GHEAP", ",", "addr", ",", "f", ",", "flags", ")", ")", ")", "HGOTO_ERROR", "(", "H5E_HEAP", ",", "H5E_CANTPROTECT", ",", "NULL", ",", "\"unable", "to", "protect", "global", "heap\"", ")", "/*", "Set", "the", "heap\\'s", "address", "*/", "heap", "->", "addr", "=", "addr", ";", "/*", "Set", "the", "return", "value", "*/", "ret_value", "=", "heap", ";", "done", ":", "FUNC_LEAVE_NOAPI", "(", "ret_value", ")", "}'" ]
H5HG__protect
gsjaardema/seacas
multi_line
train
1,046
1,314
[ "Frees", "resources", "within", "a", "message,", "but", "doesn't", "free", "the", "message", "itself" ]
[ "'static", "herr_t", "H5O__dtype_reset", "(", "void", "*", "_mesg", ")", "{", "H5T_t", "*", "dt", "=", "(", "H5T_t", "*", ")", "_mesg", ";", "FUNC_ENTER_STATIC_NOERR", "if", "(", "dt", ")", "H5T__free", "(", "dt", ")", ";", "FUNC_LEAVE_NOAPI", "(", "SUCCEED", ")", "}'" ]
H5O__dtype_reset
tbeu/matio
multi_line
train
1,047
1,315
[ "Copy", "a", "native", "datatype", "message", "from", "one", "file", "to", "another" ]
[ "'static", "void", "*", "H5O__dtype_copy_file", "(", "H5F_t", "H5_ATTR_UNUSED", "*", "file_src", ",", "const", "H5O_msg_class_t", "*", "mesg_type", ",", "void", "*", "native_src", ",", "H5F_t", "*", "file_dst", ",", "hbool_t", "H5_ATTR_UNUSED", "*", "recompute_size", ",", "H5O_copy_t", "H5_ATTR_UNUSED", "*", "cpy_info", ",", "void", "H5_ATTR_UNUSED", "*", "udata", ")", "{", "H5T_t", "*", "dst_mesg", ";", "/*", "Destination", "datatype", "*/", "void", "*", "ret_value", "=", "NULL", ";", "/*", "Return", "value", "*/", "FUNC_ENTER_STATIC", "/*", "Perform", "a", "normal", "copy", "of", "the", "object", "header", "message", "*/", "if", "(", "NULL", "==", "(", "dst_mesg", "=", "(", "H5T_t", "*", ")", "H5O_dtype_copy", "(", "native_src", ",", "NULL", ")", ")", ")", "HGOTO_ERROR", "(", "H5E_DATATYPE", ",", "H5E_CANTINIT", ",", "NULL", ",", "\"unable", "to", "copy\"", ")", "/*", "The", "datatype", "will", "be", "in", "the", "new", "file;", "set", "its", "location.", "*/", "if", "(", "H5T_set_loc", "(", "dst_mesg", ",", "H5F_VOL_OBJ", "(", "file_dst", ")", ",", "H5T_LOC_DISK", ")", "<", "0", ")", "HGOTO_ERROR", "(", "H5E_DATATYPE", ",", "H5E_CANTINIT", ",", "NULL", ",", "\"unable", "to", "set", "location\"", ")", "ret_value", "=", "dst_mesg", ";", "done", ":", "if", "(", "NULL", "==", "ret_value", ")", "H5O_msg_free", "(", "mesg_type", "->", "id", ",", "dst_mesg", ")", ";", "FUNC_LEAVE_NOAPI", "(", "ret_value", ")", "}'" ]
H5O__dtype_copy_file
tbeu/matio
multi_line
train
1,048
1,316
[ "Copies", "sharing", "information", "from", "SH", "into", "the", "message" ]
[ "'static", "herr_t", "H5O_dtype_set_share", "(", "void", "*", "_mesg", "/*in,out*/", ",", "const", "H5O_shared_t", "*", "sh", ")", "{", "H5T_t", "*", "dt", "=", "(", "H5T_t", "*", ")", "_mesg", ";", "herr_t", "ret_value", "=", "SUCCEED", ";", "FUNC_ENTER_NOAPI_NOINIT", "HDassert", "(", "dt", ")", ";", "HDassert", "(", "sh", ")", ";", "/*", "Make", "sure", "the", "shared", "message", "location", "is", "initialized,", "so", "that", "it", "*", "either", "has", "valid", "sharing", "information", "or", "is", "set", "to", "0.", "*/", "HDassert", "(", "sh", "->", "type", "<=", "H5O_SHARE_TYPE_HERE", ")", ";", "/*", "Make", "sure", "we\\'re", "not", "sharing", "a", "committed", "type", "in", "the", "heap", "*/", "HDassert", "(", "sh", "->", "type", "==", "H5O_SHARE_TYPE_COMMITTED", "||", "(", "dt", "->", "shared", "->", "state", "!=", "H5T_STATE_OPEN", "&&", "dt", "->", "shared", "->", "state", "!=", "H5T_STATE_NAMED", ")", ")", ";", "/*", "Copy", "the", "shared", "information", "*/", "if", "(", "H5O_set_shared", "(", "&", "(", "dt", "->", "sh_loc", ")", ",", "sh", ")", "<", "0", ")", "HGOTO_ERROR", "(", "H5E_OHDR", ",", "H5E_CANTCOPY", ",", "FAIL", ",", "\"unable", "to", "copy", "shared", "message", "info\"", ")", "/*", "If", "this", "is", "now", "a", "committed", "datatype,", "set", "its", "state", "properly.", "*/", "if", "(", "sh", "->", "type", "==", "H5O_SHARE_TYPE_COMMITTED", ")", "{", "dt", "->", "shared", "->", "state", "=", "H5T_STATE_NAMED", ";", "/*", "Set", "up", "the", "object", "location", "for", "the", "datatype", "also", "*/", "if", "(", "H5O_loc_reset", "(", "&", "(", "dt", "->", "oloc", ")", ")", "<", "0", ")", "HGOTO_ERROR", "(", "H5E_DATATYPE", ",", "H5E_CANTINIT", ",", "FAIL", ",", "\"unable", "to", "reset", "location\"", ")", "dt", "->", "oloc", ".", "file", "=", "sh", "->", "file", ";", "dt", "->", "oloc", ".", "addr", "=", "sh", "->", "u", ".", "loc", ".", "oh_addr", ";", "}", "/*", "end", "if", "*/", "done", ":", "FUNC_LEAVE_NOAPI", "(", "ret_value", ")", "}'" ]
H5O_dtype_set_share
tbeu/matio
multi_line
train
1,049
1,317
[ "Update", "a", "message", "after", "the", "shared", "message", "operations", "during", "the", "postcopy", "loop" ]
[ "'static", "herr_t", "H5O__dtype_shared_post_copy_upd", "(", "const", "H5O_loc_t", "H5_ATTR_UNUSED", "*", "src_oloc", ",", "const", "void", "H5_ATTR_UNUSED", "*", "mesg_src", ",", "H5O_loc_t", "H5_ATTR_UNUSED", "*", "dst_oloc", ",", "void", "*", "mesg_dst", ",", "H5O_copy_t", "H5_ATTR_UNUSED", "*", "cpy_info", ")", "{", "H5T_t", "*", "dt_dst", "=", "(", "H5T_t", "*", ")", "mesg_dst", ";", "/*", "Destination", "datatype", "*/", "herr_t", "ret_value", "=", "SUCCEED", ";", "/*", "Return", "value", "*/", "FUNC_ENTER_STATIC", "if", "(", "dt_dst", "->", "sh_loc", ".", "type", "==", "H5O_SHARE_TYPE_COMMITTED", ")", "{", "HDassert", "(", "H5T_is_named", "(", "dt_dst", ")", ")", ";", "if", "(", "H5O_loc_reset", "(", "&", "(", "dt_dst", "->", "oloc", ")", ")", "<", "0", ")", "HGOTO_ERROR", "(", "H5E_DATATYPE", ",", "H5E_CANTINIT", ",", "FAIL", ",", "\"unable", "to", "reset", "location\"", ")", "dt_dst", "->", "oloc", ".", "file", "=", "dt_dst", "->", "sh_loc", ".", "file", ";", "dt_dst", "->", "oloc", ".", "addr", "=", "dt_dst", "->", "sh_loc", ".", "u", ".", "loc", ".", "oh_addr", ";", "}", "/*", "end", "if", "*/", "else", "{", "HDassert", "(", "!", "H5T_is_named", "(", "dt_dst", ")", ")", ";", "}", "done", ":", "FUNC_LEAVE_NOAPI", "(", "ret_value", ")", "}'" ]
H5O__dtype_shared_post_copy_upd
tbeu/matio
multi_line
train
1,050
1,318
[ "Perform", "any", "necessary", "actions", "before", "copying", "message", "between", "files" ]
[ "'static", "herr_t", "H5O_dtype_pre_copy_file", "(", "H5F_t", "*", "file_src", ",", "const", "void", "*", "mesg_src", ",", "hbool_t", "H5_ATTR_UNUSED", "*", "deleted", ",", "const", "H5O_copy_t", "*", "cpy_info", ",", "void", "*", "_udata", ")", "{", "const", "H5T_t", "*", "dt_src", "=", "(", "const", "H5T_t", "*", ")", "mesg_src", ";", "/*", "Source", "datatype", "*/", "H5D_copy_file_ud_t", "*", "udata", "=", "(", "H5D_copy_file_ud_t", "*", ")", "_udata", ";", "/*", "Dataset", "copying", "user", "data", "*/", "herr_t", "ret_value", "=", "SUCCEED", ";", "/*", "Return", "value", "*/", "FUNC_ENTER_NOAPI_NOINIT", "/*", "check", "args", "*/", "HDassert", "(", "file_src", ")", ";", "HDassert", "(", "dt_src", ")", ";", "HDassert", "(", "cpy_info", ")", ";", "HDassert", "(", "cpy_info", "->", "file_dst", ")", ";", "/*", "Check", "to", "ensure", "that", "the", "version", "of", "the", "message", "to", "be", "copied", "does", "not", "exceed", "the", "message", "version", "as", "indicated", "by", "the", "destination", "file\\'s", "high", "bound", "*/", "if", "(", "dt_src", "->", "shared", "->", "version", ">", "H5O_dtype_ver_bounds", "[", "H5F_HIGH_BOUND", "(", "cpy_info", "->", "file_dst", ")", "]", ")", "HGOTO_ERROR", "(", "H5E_OHDR", ",", "H5E_BADRANGE", ",", "FAIL", ",", "\"datatype", "message", "version", "out", "of", "bounds\"", ")", "/*", "If", "the", "user", "data", "is", "non-NULL,", "assume", "we", "are", "copying", "a", "dataset", "*", "and", "check", "if", "we", "need", "to", "make", "a", "copy", "of", "the", "datatype", "for", "later", "in", "*", "the", "object", "copying", "process.", "(We", "currently", "only", "need", "to", "make", "a", "copy", "*", "of", "the", "datatype", "if", "it\\'s", "a", "vlen", "or", "reference", "datatype,", "or", "if", "the", "layout", "*", "message", "is", "an", "early", "version,", "but", "since", "the", "layout", "information", "isn\\'t", "*", "available", "here,", "we", "just", "make", "a", "copy", "in", "all", "situations)", "*/", "if", "(", "udata", ")", "{", "/*", "Create", "a", "memory", "copy", "of", "the", "variable-length", "datatype", "*/", "if", "(", "NULL", "==", "(", "udata", "->", "src_dtype", "=", "H5T_copy", "(", "dt_src", ",", "H5T_COPY_TRANSIENT", ")", ")", ")", "HGOTO_ERROR", "(", "H5E_DATATYPE", ",", "H5E_CANTINIT", ",", "FAIL", ",", "\"unable", "to", "copy\"", ")", "/*", "Set", "the", "location", "of", "the", "source", "datatype", "to", "describe", "the", "disk", "form", "of", "the", "data", "*/", "if", "(", "H5T_set_loc", "(", "udata", "->", "src_dtype", ",", "H5F_VOL_OBJ", "(", "file_src", ")", ",", "H5T_LOC_DISK", ")", "<", "0", ")", "HGOTO_ERROR", "(", "H5E_DATATYPE", ",", "H5E_CANTINIT", ",", "FAIL", ",", "\"cannot", "mark", "datatype", "on", "disk\"", ")", "}", "/*", "end", "if", "*/", "done", ":", "FUNC_LEAVE_NOAPI", "(", "ret_value", ")", "}'" ]
H5O_dtype_pre_copy_file
tbeu/matio
multi_line
train
1,051
1,319
[ "Determines", "if", "this", "datatype", "is", "allowed", "to", "be", "shared", "or", "not" ]
[ "'static", "htri_t", "H5O_dtype_can_share", "(", "const", "void", "*", "_mesg", ")", "{", "const", "H5T_t", "*", "mesg", "=", "(", "const", "H5T_t", "*", ")", "_mesg", ";", "htri_t", "tri_ret", ";", "htri_t", "ret_value", "=", "TRUE", ";", "FUNC_ENTER_NOAPI_NOINIT", "HDassert", "(", "mesg", ")", ";", "/*", "Don\\'t", "share", "immutable", "datatypes", "*/", "if", "(", "(", "tri_ret", "=", "H5T_is_immutable", "(", "mesg", ")", ")", ">", "0", ")", "HGOTO_DONE", "(", "FALSE", ")", "<if", "type=\"elseif\">", "else", "if", "(", "tri_ret", "<", "0", ")", "HGOTO_ERROR", "(", "H5E_OHDR", ",", "H5E_BADTYPE", ",", "FAIL", ",", "\"can\\'t", "tell", "if", "datatype", "is", "immutable\"", ")", "/*", "Don\\'t", "share", "committed", "datatypes", "*/", "if", "(", "(", "tri_ret", "=", "H5T_is_named", "(", "mesg", ")", ")", ">", "0", ")", "HGOTO_DONE", "(", "FALSE", ")", "<if", "type=\"elseif\">", "else", "if", "(", "tri_ret", "<", "0", ")", "HGOTO_ERROR", "(", "H5E_OHDR", ",", "H5E_BADTYPE", ",", "FAIL", ",", "\"can\\'t", "tell", "if", "datatype", "is", "shared\"", ")", "done", ":", "FUNC_LEAVE_NOAPI", "(", "ret_value", ")", "}'" ]
H5O_dtype_can_share
tbeu/matio
multi_line
train
1,052
1,320
[ "SPI", "Disable", "the", "Receive", "Buffer", "Ready", "Interrupt" ]
[ "'void", "spi_disable_rx_buffer_not_empty_interrupt", "(", "uint32_t", "spi", ")", "{", "SPI_CR2", "(", "spi", ")", "&=", "~", "SPI_CR2_RXNEIE", ";", "}'" ]
spi_disable_rx_buffer_not_empty_interrupt
rad1o/f1rmware
multi_line
train
1,053
1,321
[ "SPI", "Set", "the", "NSS", "Pin", "as", "an", "Input" ]
[ "'void", "spi_disable_ss_output", "(", "uint32_t", "spi", ")", "{", "SPI_CR2", "(", "spi", ")", "&=", "~", "SPI_CR2_SSOE", ";", "}'" ]
spi_disable_ss_output
rad1o/f1rmware
multi_line
train
1,054
1,322
[ "SPI", "Enable", "Transmit", "Transfers", "via", "DMA" ]
[ "'void", "spi_enable_tx_dma", "(", "uint32_t", "spi", ")", "{", "SPI_CR2", "(", "spi", ")", "|=", "SPI_CR2_TXDMAEN", ";", "}'" ]
spi_enable_tx_dma
rad1o/f1rmware
multi_line
train
1,055
1,323
[ "SPI", "Set", "to", "Master", "Mode" ]
[ "'void", "spi_set_master_mode", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "|=", "SPI_CR1_MSTR", ";", "}'" ]
spi_set_master_mode
rad1o/f1rmware
multi_line
train
1,056
1,324
[ "SPI", "Enable", "the", "Error", "Interrupt" ]
[ "'void", "spi_enable_error_interrupt", "(", "uint32_t", "spi", ")", "{", "SPI_CR2", "(", "spi", ")", "|=", "SPI_CR2_ERRIE", ";", "}'" ]
spi_enable_error_interrupt
rad1o/f1rmware
multi_line
train
1,057
1,325
[ "SPI", "Set", "the", "Software", "NSS", "Signal", "Low" ]
[ "'void", "spi_set_nss_low", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "&=", "~", "SPI_CR1_SSI", ";", "}'" ]
spi_set_nss_low
rad1o/f1rmware
multi_line
train
1,058
1,326
[ "SPI", "Set", "the", "Clock", "Phase", "to", "Capture", "on", "Leading", "Edge" ]
[ "'void", "spi_set_clock_phase_0", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "&=", "~", "SPI_CR1_CPHA", ";", "}'" ]
spi_set_clock_phase_0
rad1o/f1rmware
multi_line
train
1,059
1,327
[ "SPI", "Set", "Unidirectional", "Mode" ]
[ "'void", "spi_set_unidirectional_mode", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "&=", "~", "SPI_CR1_BIDIMODE", ";", "}'" ]
spi_set_unidirectional_mode
rad1o/f1rmware
multi_line
train
1,060
1,328
[ "SPI", "Enable", "the", "Receive", "Buffer", "Ready", "Interrupt" ]
[ "'void", "spi_enable_rx_buffer_not_empty_interrupt", "(", "uint32_t", "spi", ")", "{", "SPI_CR2", "(", "spi", ")", "|=", "SPI_CR2_RXNEIE", ";", "}'" ]
spi_enable_rx_buffer_not_empty_interrupt
rad1o/f1rmware
multi_line
train
1,061
1,329
[ "SPI", "Next", "Transmit", "is", "a", "CRC", "Word" ]
[ "'void", "spi_set_next_tx_from_crc", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "|=", "SPI_CR1_CRCNEXT", ";", "}'" ]
spi_set_next_tx_from_crc
rad1o/f1rmware
multi_line
train
1,062
1,330
[ "SPI", "Enable", "the", "CRC" ]
[ "'void", "spi_enable_crc", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "|=", "SPI_CR1_CRCEN", ";", "}'" ]
spi_enable_crc
rad1o/f1rmware
multi_line
train
1,063
1,331
[ "SPI", "Set", "Bidirectional", "Simplex", "Mode" ]
[ "'void", "spi_set_bidirectional_mode", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "|=", "SPI_CR1_BIDIMODE", ";", "}'" ]
spi_set_bidirectional_mode
rad1o/f1rmware
multi_line
train
1,064
1,332
[ "SPI", "Set", "the", "Clock", "Polarity", "to", "Low", "when", "Idle" ]
[ "'void", "spi_set_clock_polarity_0", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "&=", "~", "SPI_CR1_CPOL", ";", "}'" ]
spi_set_clock_polarity_0
rad1o/f1rmware
multi_line
train
1,065
1,333
[ "SPI", "Set", "to", "Slave", "Mode" ]
[ "'void", "spi_set_slave_mode", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "&=", "~", "SPI_CR1_MSTR", ";", "}'" ]
spi_set_slave_mode
rad1o/f1rmware
multi_line
train
1,066
1,334
[ "SPI", "Disable", "the", "Transmit", "Buffer", "Empty", "Interrupt" ]
[ "'void", "spi_disable_tx_buffer_empty_interrupt", "(", "uint32_t", "spi", ")", "{", "SPI_CR2", "(", "spi", ")", "&=", "~", "SPI_CR2_TXEIE", ";", "}'" ]
spi_disable_tx_buffer_empty_interrupt
rad1o/f1rmware
multi_line
train
1,067
1,335
[ "SPI", "Set", "the", "Clock", "Phase", "to", "Capture", "on", "Trailing", "Edge" ]
[ "'void", "spi_set_clock_phase_1", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "|=", "SPI_CR1_CPHA", ";", "}'" ]
spi_set_clock_phase_1
rad1o/f1rmware
multi_line
train
1,068
1,336
[ "SPI", "Set", "to", "Send", "LSB", "First" ]
[ "'void", "spi_send_lsb_first", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "|=", "SPI_CR1_LSBFIRST", ";", "}'" ]
spi_send_lsb_first
rad1o/f1rmware
multi_line
train
1,069
1,337
[ "SPI", "Enable", "the", "Transmit", "Buffer", "Empty", "Interrupt" ]
[ "'void", "spi_enable_tx_buffer_empty_interrupt", "(", "uint32_t", "spi", ")", "{", "SPI_CR2", "(", "spi", ")", "|=", "SPI_CR2_TXEIE", ";", "}'" ]
spi_enable_tx_buffer_empty_interrupt
rad1o/f1rmware
multi_line
train
1,070
1,338
[ "SPI", "Enable", "Slave", "Management", "by", "Software" ]
[ "'void", "spi_enable_software_slave_management", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "|=", "SPI_CR1_SSM", ";", "}'" ]
spi_enable_software_slave_management
rad1o/f1rmware
multi_line
train
1,071
1,339
[ "SPI", "Set", "Receive", "Only", "Mode", "for", "Simplex", "(2wire)", "Unidirectional" ]
[ "'void", "spi_set_receive_only_mode", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "|=", "SPI_CR1_RXONLY", ";", "}'" ]
spi_set_receive_only_mode
rad1o/f1rmware
multi_line
train
1,072
1,340
[ "SPI", "Disable", "the", "CRC" ]
[ "'void", "spi_disable_crc", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "&=", "~", "SPI_CR1_CRCEN", ";", "}'" ]
spi_disable_crc
rad1o/f1rmware
multi_line
train
1,073
1,341
[ "SPI", "Data", "Write", "with", "Blocking" ]
[ "'void", "spi_send", "(", "uint32_t", "spi", ",", "uint16_t", "data", ")", "{", "/*", "Wait", "for", "transfer", "finished.", "*/", "while", "(", "!", "(", "SPI_SR", "(", "spi", ")", "&", "SPI_SR_TXE", ")", ")", ";", "/*", "Write", "data", "(8", "or", "16", "bits,", "depending", "on", "DFF)", "into", "DR.", "*/", "SPI_DR", "(", "spi", ")", "=", "data", ";", "}'" ]
spi_send
rad1o/f1rmware
multi_line
train
1,074
1,342
[ "SPI", "Set", "Bidirectional", "Simplex", "Receive", "Only", "Mode" ]
[ "'void", "spi_set_bidirectional_transmit_only_mode", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "|=", "SPI_CR1_BIDIMODE", ";", "SPI_CR1", "(", "spi", ")", "|=", "SPI_CR1_BIDIOE", ";", "}'" ]
spi_set_bidirectional_transmit_only_mode
rad1o/f1rmware
multi_line
train
1,075
1,343
[ "SPI", "Next", "Transmit", "is", "a", "Data", "Word" ]
[ "'void", "spi_set_next_tx_from_buffer", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "&=", "~", "SPI_CR1_CRCNEXT", ";", "}'" ]
spi_set_next_tx_from_buffer
rad1o/f1rmware
multi_line
train
1,076
1,344
[ "SPI", "Enable", "Slave", "Management", "by", "Hardware" ]
[ "'void", "spi_disable_software_slave_management", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "&=", "~", "SPI_CR1_SSM", ";", "}'" ]
spi_disable_software_slave_management
rad1o/f1rmware
multi_line
train
1,077
1,345
[ "SPI", "Disable", "Transmit", "Transfers", "via", "DMA" ]
[ "'void", "spi_disable_tx_dma", "(", "uint32_t", "spi", ")", "{", "SPI_CR2", "(", "spi", ")", "&=", "~", "SPI_CR2_TXDMAEN", ";", "}'" ]
spi_disable_tx_dma
rad1o/f1rmware
multi_line
train
1,078
1,346
[ "SPI", "Set", "to", "Send", "MSB", "First" ]
[ "'void", "spi_send_msb_first", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "&=", "~", "SPI_CR1_LSBFIRST", ";", "}'" ]
spi_send_msb_first
rad1o/f1rmware
multi_line
train
1,079
1,347
[ "SPI", "Set", "the", "Clock", "Polarity", "to", "High", "when", "Idle" ]
[ "'void", "spi_set_clock_polarity_1", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "|=", "SPI_CR1_CPOL", ";", "}'" ]
spi_set_clock_polarity_1
rad1o/f1rmware
multi_line
train
1,080
1,348
[ "SPI", "Set", "Full", "Duplex", "(3wire)", "Mode" ]
[ "'void", "spi_set_full_duplex_mode", "(", "uint32_t", "spi", ")", "{", "SPI_CR1", "(", "spi", ")", "&=", "~", "SPI_CR1_RXONLY", ";", "}'" ]
spi_set_full_duplex_mode
rad1o/f1rmware
multi_line
train
1,081
1,349
[ "Show", "the", "screen", "layout", "defined" ]
[ "'static", "void", "show_layout", "(", "enum", "tui_layout_type", "layout", ")", "{", "enum", "tui_layout_type", "cur_layout", "=", "tui_current_layout", "()", ";", "if", "(", "layout", "!=", "cur_layout", ")", "{", "/*", "Since", "the", "new", "layout", "may", "cause", "changes", "in", "window", "size,", "we", "should", "free", "the", "content", "and", "reallocate", "on", "next", "display", "of", "source/asm.", "*/", "tui_free_all_source_wins_content", "()", ";", "tui_clear_source_windows", "()", ";", "if", "(", "layout", "==", "SRC_DATA_COMMAND", "||", "layout", "==", "DISASSEM_DATA_COMMAND", ")", "{", "show_data", "(", "layout", ")", ";", "tui_refresh_all", "(", "tui_win_list", ")", ";", "}", "else", "{", "/*", "First", "make", "the", "current", "layout", "be", "invisible.", "*/", "tui_make_all_invisible", "()", ";", "tui_make_invisible", "(", "tui_locator_win_info_ptr", "()", ")", ";", "switch", "(", "layout", ")", "{", "/*", "Now", "show", "the", "new", "layout.", "*/", "case", "SRC_COMMAND", ":", "show_source_command", "()", ";", "tui_add_to_source_windows", "(", "TUI_SRC_WIN", ")", ";", "break;", "case", "DISASSEM_COMMAND", ":", "show_disasm_command", "()", ";", "tui_add_to_source_windows", "(", "TUI_DISASM_WIN", ")", ";", "break;", "case", "SRC_DISASSEM_COMMAND", ":", "show_source_disasm_command", "()", ";", "tui_add_to_source_windows", "(", "TUI_SRC_WIN", ")", ";", "tui_add_to_source_windows", "(", "TUI_DISASM_WIN", ")", ";", "break;", "default:", "break;", "}", "}", "}", "}'" ]
show_layout
SuperHouse/esp-open-rtos
single_line
train
1,082
1,350
[ "Recompute", "forwarder", "flag", "after", "block", "has", "been", "modified" ]
[ "'static", "void", "update_forwarder_flag", "(", "basic_block", "bb", ")", "{", "if", "(", "forwarder_block_p", "(", "bb", ")", ")", "bb", "->", "flags", "|=", "BB_FORWARDER_BLOCK", ";", "else", "bb", "->", "flags", "&=", "~", "BB_FORWARDER_BLOCK", ";", "}'" ]
update_forwarder_flag
SuperHouse/esp-open-rtos
single_line
train
1,083
1,351
[ "Delete", "all", "unreachable", "basic", "blocks" ]
[ "'bool", "delete_unreachable_blocks", "(", "void", ")", "{", "bool", "changed", "=", "false", ";", "basic_block", "b", ",", "<type", "ref=\"prev\"/>", "prev_bb", ";", "find_unreachable_blocks", "()", ";", "/*", "When", "we\\'re", "in", "GIMPLE", "mode", "and", "there", "may", "be", "debug", "insns,", "we", "should", "delete", "blocks", "in", "reverse", "dominator", "order,", "so", "as", "to", "get", "a", "chance", "to", "substitute", "all", "released", "DEFs", "into", "debug", "stmts.", "If", "we", "don\\'t", "have", "dominators", "information,", "walking", "blocks", "backward", "gets", "us", "a", "better", "chance", "of", "retaining", "most", "debug", "information", "than", "otherwise.", "*/", "if", "(", "MAY_HAVE_DEBUG_INSNS", "&&", "current_ir_type", "()", "==", "IR_GIMPLE", "&&", "dom_info_available_p", "(", "CDI_DOMINATORS", ")", ")", "{", "for", "(", "b", "=", "EXIT_BLOCK_PTR", "->", "prev_bb", ";", "b", "!=", "ENTRY_BLOCK_PTR", ";", "b", "=", "prev_bb", ")", "{", "prev_bb", "=", "b", "->", "prev_bb", ";", "if", "(", "!", "(", "b", "->", "flags", "&", "BB_REACHABLE", ")", ")", "{", "/*", "Speed", "up", "the", "removal", "of", "blocks", "that", "don\\'t", "dominate", "others.", "Walking", "backwards,", "this", "should", "be", "the", "common", "case.", "*/", "if", "(", "!", "first_dom_son", "(", "CDI_DOMINATORS", ",", "b", ")", ")", "delete_basic_block", "(", "b", ")", ";", "else", "{", "vec", "<argument_list", "type=\"generic\">", "<", "basic_block", ">", "h", "=", "get_all_dominated_blocks", "(", "CDI_DOMINATORS", ",", "b", ")", ";", "while", "(", "h", ".", "length", "()", ")", "{", "b", "=", "h", ".", "pop", "()", ";", "prev_bb", "=", "b", "->", "prev_bb", ";", "gcc_assert", "(", "!", "(", "b", "->", "flags", "&", "BB_REACHABLE", ")", ")", ";", "delete_basic_block", "(", "b", ")", ";", "}", "h", ".", "release", "()", ";", "}", "changed", "=", "true", ";", "}", "}", "}", "else", "{", "for", "(", "b", "=", "EXIT_BLOCK_PTR", "->", "prev_bb", ";", "b", "!=", "ENTRY_BLOCK_PTR", ";", "b", "=", "prev_bb", ")", "{", "prev_bb", "=", "b", "->", "prev_bb", ";", "if", "(", "!", "(", "b", "->", "flags", "&", "BB_REACHABLE", ")", ")", "{", "delete_basic_block", "(", "b", ")", ";", "changed", "=", "true", ";", "}", "}", "}", "if", "(", "changed", ")", "tidy_fallthru_edges", "()", ";", "return", "changed", ";", "}'" ]
delete_unreachable_blocks
SuperHouse/esp-open-rtos
single_line
train
1,084
1,352
[ "Tidy", "the", "CFG", "by", "deleting", "unreachable", "code", "and", "whatnot" ]
[ "\"bool", "cleanup_cfg", "(", "int", "mode", ")", "{", "bool", "changed", "=", "false", ";", "/*", "Set", "the", "cfglayout", "mode", "flag", "here.", "We", "could", "update", "all", "the", "callers", "but", "that", "is", "just", "inconvenient,", "especially", "given", "that", "we", "eventually", "want", "to", "have", "cfglayout", "mode", "as", "the", "default.", "*/", "if", "(", "current_ir_type", "()", "==", "IR_RTL_CFGLAYOUT", ")", "mode", "|=", "CLEANUP_CFGLAYOUT", ";", "timevar_push", "(", "TV_CLEANUP_CFG", ")", ";", "if", "(", "delete_unreachable_blocks", "()", ")", "{", "changed", "=", "true", ";", "/*", "We've", "possibly", "created", "trivially", "dead", "code.", "Cleanup", "it", "right", "now", "to", "introduce", "more", "opportunities", "for", "try_optimize_cfg.", "*/", "if", "(", "!", "(", "mode", "&", "(", "CLEANUP_NO_INSN_DEL", ")", ")", "&&", "!", "reload_completed", ")", "delete_trivially_dead_insns", "(", "get_insns", "()", ",", "max_reg_num", "()", ")", ";", "}", "compact_blocks", "()", ";", "/*", "To", "tail-merge", "blocks", "ending", "in", "the", "same", "noreturn", "function", "(e.g.", "a", "call", "to", "abort)", "we", "have", "to", "insert", "fake", "edges", "to", "exit.", "Do", "this", "here", "once.", "The", "fake", "edges", "do", "not", "interfere", "with", "any", "other", "CFG", "cleanups.", "*/", "if", "(", "mode", "&", "CLEANUP_CROSSJUMP", ")", "add_noreturn_fake_exit_edges", "()", ";", "if", "(", "!", "dbg_cnt", "(", "cfg_cleanup", ")", ")", "return", "changed", ";", "while", "(", "try_optimize_cfg", "(", "mode", ")", ")", "{", "delete_unreachable_blocks", "()", ",", "changed", "=", "true", ";", "if", "(", "!", "(", "mode", "&", "CLEANUP_NO_INSN_DEL", ")", ")", "{", "/*", "Try", "to", "remove", "some", "trivially", "dead", "insns", "when", "doing", "an", "expensive", "cleanup.", "But", "delete_trivially_dead_insns", "doesn't", "work", "after", "reload", "(it", "only", "handles", "pseudos)", "and", "run_fast_dce", "is", "too", "costly", "to", "run", "in", "every", "iteration.", "For", "effective", "cross", "jumping,", "we", "really", "want", "to", "run", "a", "fast", "DCE", "to", "clean", "up", "any", "dead", "conditions,", "or", "they", "get", "in", "the", "way", "of", "performing", "useful", "tail", "merges.", "Other", "transformations", "in", "cleanup_cfg", "are", "not", "so", "sensitive", "to", "dead", "code,", "so", "delete_trivially_dead_insns", "or", "even", "doing", "nothing", "at", "all", "is", "good", "enough.", "*/", "if", "(", "(", "mode", "&", "CLEANUP_EXPENSIVE", ")", "&&", "!", "reload_completed", "&&", "!", "delete_trivially_dead_insns", "(", "get_insns", "()", ",", "max_reg_num", "()", ")", ")", "break;", "if", "(", "(", "mode", "&", "CLEANUP_CROSSJUMP", ")", "&&", "crossjumps_occured", ")", "run_fast_dce", "()", ";", "}", "else", "break;", "}", "if", "(", "mode", "&", "CLEANUP_CROSSJUMP", ")", "remove_fake_exit_edges", "()", ";", "/*", "Don't", "call", "delete_dead_jumptables", "in", "cfglayout", "mode,", "because", "that", "function", "assumes", "that", "jump", "tables", "are", "in", "the", "insns", "stream.", "But", "we", "also", "don't", "_have_", "to", "delete", "dead", "jumptables", "in", "cfglayout", "mode", "because", "we", "shouldn't", "even", "be", "looking", "at", "things", "that", "are", "not", "in", "a", "basic", "block.", "Dead", "jumptables", "are", "cleaned", "up", "when", "going", "out", "of", "cfglayout", "mode.", "*/", "if", "(", "!", "(", "mode", "&", "CLEANUP_CFGLAYOUT", ")", ")", "delete_dead_jumptables", "()", ";", "/*", "???", "We", "probably", "do", "this", "way", "too", "often.", "*/", "if", "(", "current_loops", "&&", "(", "changed", "||", "(", "mode", "&", "CLEANUP_CFG_CHANGED", ")", ")", ")", "{", "timevar_push", "(", "TV_REPAIR_LOOPS", ")", ";", "/*", "The", "above", "doesn't", "preserve", "dominance", "info", "if", "available.", "*/", "gcc_assert", "(", "!", "dom_info_available_p", "(", "CDI_DOMINATORS", ")", ")", ";", "calculate_dominance_info", "(", "CDI_DOMINATORS", ")", ";", "fix_loop_structure", "(", "NULL", ")", ";", "free_dominance_info", "(", "CDI_DOMINATORS", ")", ";", "timevar_pop", "(", "TV_REPAIR_LOOPS", ")", ";", "}", "timevar_pop", "(", "TV_CLEANUP_CFG", ")", ";", "return", "changed", ";", "}\"" ]
cleanup_cfg
SuperHouse/esp-open-rtos
single_line
train
1,085
1,353
[ "Verify", "that", "all", "entries", "in", "this", "node", "contain", "cached", "symbol", "table", "information", "if", "and", "only", "if", "the", "entry", "refers", "to", "a", "group", "with", "a", "symbol", "table,", "and", "that", "that", "information", "is", "correct" ]
[ "'static", "int", "H5G__verify_cached_stabs_test_cb", "(", "H5F_t", "*", "f", ",", "const", "void", "H5_ATTR_UNUSED", "*", "_lt_key", ",", "haddr_t", "addr", ",", "const", "void", "H5_ATTR_UNUSED", "*", "_rt_key", ",", "void", "H5_ATTR_UNUSED", "*", "udata", ")", "{", "H5G_node_t", "*", "sn", "=", "NULL", ";", "H5O_loc_t", "targ_oloc", ";", "H5O_t", "*", "targ_oh", "=", "NULL", ";", "htri_t", "stab_exists", ";", "H5O_stab_t", "stab", ";", "unsigned", "i", ";", "int", "ret_value", "=", "H5_ITER_CONT", ";", "FUNC_ENTER_STATIC", "/*", "Check", "arguments", "*/", "HDassert", "(", "f", ")", ";", "HDassert", "(", "H5F_addr_defined", "(", "addr", ")", ")", ";", "/*", "Load", "the", "node", "*/", "if", "(", "NULL", "==", "(", "sn", "=", "(", "H5G_node_t", "*", ")", "H5AC_protect", "(", "f", ",", "H5AC_SNODE", ",", "addr", ",", "f", ",", "H5AC__READ_ONLY_FLAG", ")", ")", ")", "HGOTO_ERROR", "(", "H5E_SYM", ",", "H5E_CANTLOAD", ",", "H5_ITER_ERROR", ",", "\"unable", "to", "load", "symbol", "table", "node\"", ")", "/*", "Check", "each", "target", "object", "to", "see", "if", "its", "stab", "message", "(if", "present)", "matches", "*", "the", "cached", "stab", "(if", "present).", "If", "one", "exists,", "both", "must", "exist.", "*/", "/*", "Initialize", "constant", "fields", "in", "target", "oloc", "*/", "targ_oloc", ".", "file", "=", "f", ";", "targ_oloc", ".", "holding_file", "=", "FALSE", ";", "/*", "Iterate", "over", "entries", "*/", "for", "(", "i", "=", "0", ";", "i", "<", "sn", "->", "nsyms", ";", "i", "++", ")", "{", "/*", "Update", "oloc", "address", "*/", "targ_oloc", ".", "addr", "=", "sn", "->", "entry", "[", "i", "]", ".", "header", ";", "/*", "Load", "target", "object", "header", "*/", "if", "(", "NULL", "==", "(", "targ_oh", "=", "H5O_protect", "(", "&", "targ_oloc", ",", "H5AC__READ_ONLY_FLAG", ",", "FALSE", ")", ")", ")", "HGOTO_ERROR", "(", "H5E_SYM", ",", "H5E_CANTPROTECT", ",", "H5_ITER_ERROR", ",", "\"unable", "to", "protect", "target", "object", "header\"", ")", "/*", "Check", "if", "a", "symbol", "table", "message", "exists", "*/", "if", "(", "(", "stab_exists", "=", "H5O_msg_exists_oh", "(", "targ_oh", ",", "H5O_STAB_ID", ")", ")", "<", "0", ")", "HGOTO_ERROR", "(", "H5E_SYM", ",", "H5E_NOTFOUND", ",", "H5_ITER_ERROR", ",", "\"unable", "to", "check", "for", "STAB", "message\"", ")", "if", "(", "stab_exists", ")", "{", "/*", "Read", "symbol", "table", "message", "*/", "if", "(", "NULL", "==", "H5O_msg_read_oh", "(", "f", ",", "targ_oh", ",", "H5O_STAB_ID", ",", "&", "stab", ")", ")", "HGOTO_ERROR", "(", "H5E_SYM", ",", "H5E_CANTGET", ",", "H5_ITER_ERROR", ",", "\"unable", "to", "read", "STAB", "message\"", ")", "/*", "Check", "if", "the", "stab", "matches", "the", "cached", "stab", "info", "*/", "if", "(", "sn", "->", "entry", "[", "i", "]", ".", "type", "!=", "H5G_CACHED_STAB", ")", "HGOTO_ERROR", "(", "H5E_SYM", ",", "H5E_BADVALUE", ",", "H5_ITER_ERROR", ",", "\"STAB", "message", "is", "not", "cached", "in", "group", "node\"", ")", "if", "(", "(", "sn", "->", "entry", "[", "i", "]", ".", "cache", ".", "stab", ".", "btree_addr", "!=", "stab", ".", "btree_addr", ")", "||", "(", "sn", "->", "entry", "[", "i", "]", ".", "cache", ".", "stab", ".", "heap_addr", "!=", "stab", ".", "heap_addr", ")", ")", "HGOTO_ERROR", "(", "H5E_SYM", ",", "H5E_BADVALUE", ",", "H5_ITER_ERROR", ",", "\"cached", "symbol", "table", "information", "is", "incorrect\"", ")", "}", "<if", "type=\"elseif\">", "else", "if", "(", "sn", "->", "entry", "[", "i", "]", ".", "type", "==", "H5G_CACHED_STAB", ")", "HGOTO_ERROR", "(", "H5E_SYM", ",", "H5E_BADVALUE", ",", "H5_ITER_ERROR", ",", "\"nonexistent", "STAB", "message", "is", "cached\"", ")", "/*", "Unprotect", "target", "object", "*/", "if", "(", "H5O_unprotect", "(", "&", "targ_oloc", ",", "targ_oh", ",", "H5AC__NO_FLAGS_SET", ")", "<", "0", ")", "HGOTO_ERROR", "(", "H5E_SYM", ",", "H5E_CANTUNPROTECT", ",", "H5_ITER_ERROR", ",", "\"unable", "to", "release", "object", "header\"", ")", ";", "targ_oh", "=", "NULL", ";", "}", "/*", "end", "for", "*/", "done", ":", "if", "(", "sn", "&&", "H5AC_unprotect", "(", "f", ",", "H5AC_SNODE", ",", "addr", ",", "sn", ",", "H5AC__NO_FLAGS_SET", ")", "<", "0", ")", "HDONE_ERROR", "(", "H5E_SYM", ",", "H5E_PROTECT", ",", "H5_ITER_ERROR", ",", "\"unable", "to", "release", "object", "header\"", ")", "if", "(", "targ_oh", ")", "{", "HDassert", "(", "ret_value", "==", "H5_ITER_ERROR", ")", ";", "if", "(", "H5O_unprotect", "(", "&", "targ_oloc", ",", "targ_oh", ",", "H5AC__NO_FLAGS_SET", ")", "<", "0", ")", "HDONE_ERROR", "(", "H5E_SYM", ",", "H5E_CANTUNPROTECT", ",", "H5_ITER_ERROR", ",", "\"unable", "to", "release", "object", "header\"", ")", ";", "}", "/*", "end", "if", "*/", "FUNC_LEAVE_NOAPI", "(", "ret_value", ")", "}'" ]
H5G__verify_cached_stabs_test_cb
tbeu/matio
multi_line
train
1,086
1,354
[ "If", "the", "provided", "group", "contains", "a", "symbol", "table,", "verifies", "that", "all", "links", "in", "the", "group", "contain", "cached", "symbol", "table", "information", "if", "and", "only", "if", "the", "link", "points", "to", "a", "group", "with", "a", "symbol", "table,", "and", "that", "that", "information", "is", "correct" ]
[ "'herr_t", "H5G__verify_cached_stabs_test", "(", "hid_t", "gid", ")", "{", "H5G_t", "*", "grp", "=", "NULL", ";", "/*", "Group", "*/", "htri_t", "stab_exists", ";", "H5O_stab_t", "stab", ";", "/*", "Symbol", "table", "message", "*/", "H5G_bt_common_t", "udata", "=", "{", "NULL", ",", "NULL", "}", ";", "/*", "Dummy", "udata", "so", "H5B_iterate", "doesn\\'t", "freak", "out", "*/", "haddr_t", "prev_tag", "=", "HADDR_UNDEF", ";", "/*", "Previous", "metadata", "tag", "*/", "herr_t", "ret_value", "=", "SUCCEED", ";", "/*", "Return", "value", "*/", "FUNC_ENTER_PACKAGE", "/*", "check", "args", "*/", "HDassert", "(", "gid", ">=", "0", ")", ";", "/*", "Check", "args", "*/", "if", "(", "NULL", "==", "(", "grp", "=", "(", "H5G_t", "*", ")", "H5VL_object_verify", "(", "gid", ",", "H5I_GROUP", ")", ")", ")", "HGOTO_ERROR", "(", "H5E_ARGS", ",", "H5E_BADTYPE", ",", "FAIL", ",", "\"not", "a", "group\"", ")", "/*", "Set", "up", "metadata", "tagging", "*/", "H5AC_tag", "(", "grp", "->", "oloc", ".", "addr", ",", "&", "prev_tag", ")", ";", "/*", "Check", "for", "group", "having", "a", "symbol", "table", "message", "*/", "/*", "Check", "for", "the", "group", "having", "a", "group", "info", "message", "*/", "if", "(", "(", "stab_exists", "=", "H5O_msg_exists", "(", "&", "(", "grp", "->", "oloc", ")", ",", "H5O_STAB_ID", ")", ")", "<", "0", ")", "HGOTO_ERROR", "(", "H5E_SYM", ",", "H5E_CANTINIT", ",", "FAIL", ",", "\"unable", "to", "read", "object", "header\"", ")", "/*", "No", "need", "to", "check", "anything", "if", "the", "symbol", "table", "doesn\\'t", "exist", "*/", "if", "(", "!", "stab_exists", ")", "HGOTO_DONE", "(", "SUCCEED", ")", ";", "/*", "Read", "the", "stab", "*/", "if", "(", "NULL", "==", "H5O_msg_read", "(", "&", "(", "grp", "->", "oloc", ")", ",", "H5O_STAB_ID", ",", "&", "stab", ")", ")", "HGOTO_ERROR", "(", "H5E_SYM", ",", "H5E_BADMESG", ",", "FAIL", ",", "\"can\\'t", "get", "symbol", "table", "info\"", ")", "/*", "Iterate", "over", "the", "b-tree,", "checking", "validity", "of", "cached", "information", "*/", "if", "(", "(", "ret_value", "=", "H5B_iterate", "(", "grp", "->", "oloc", ".", "file", ",", "H5B_SNODE", ",", "stab", ".", "btree_addr", ",", "H5G__verify_cached_stabs_test_cb", ",", "&", "udata", ")", ")", "<", "0", ")", "HGOTO_ERROR", "(", "H5E_SYM", ",", "H5E_CANTNEXT", ",", "FAIL", ",", "\"iteration", "operator", "failed\"", ")", ";", "/*", "Reset", "metadata", "tagging", "*/", "H5AC_tag", "(", "prev_tag", ",", "NULL", ")", ";", "done", ":", "FUNC_LEAVE_NOAPI", "(", "ret_value", ")", "}'" ]
H5G__verify_cached_stabs_test
tbeu/matio
multi_line
train
1,087
1,356
[ "FLASH", "Power", "Down", "configuration", "functions" ]
[ "'void", "PWR_FlashPowerDownCmd", "(", "FunctionalState", "NewState", ")", "{", "/*", "Check", "the", "parameters", "*/", "assert_param", "(", "IS_FUNCTIONAL_STATE", "(", "NewState", ")", ")", ";", "*", "(", "__IO", "uint32_t", "*", ")", "CR_FPDS_BB", "=", "(", "uint32_t", ")", "NewState", ";", "}'" ]
PWR_FlashPowerDownCmd
rene-dev/stmbl
multi_line
train
1,088
1,357
[ "Enables", "or", "disables", "the", "Power", "Voltage", "Detector(PVD)" ]
[ "'void", "PWR_PVDCmd", "(", "FunctionalState", "NewState", ")", "{", "/*", "Check", "the", "parameters", "*/", "assert_param", "(", "IS_FUNCTIONAL_STATE", "(", "NewState", ")", ")", ";", "*", "(", "__IO", "uint32_t", "*", ")", "CR_PVDE_BB", "=", "(", "uint32_t", ")", "NewState", ";", "}'" ]
PWR_PVDCmd
rene-dev/stmbl
multi_line
train
1,089
1,358
[ "Main", "and", "Backup", "Regulators", "configuration", "functions" ]
[ "'void", "PWR_BackupRegulatorCmd", "(", "FunctionalState", "NewState", ")", "{", "/*", "Check", "the", "parameters", "*/", "assert_param", "(", "IS_FUNCTIONAL_STATE", "(", "NewState", ")", ")", ";", "*", "(", "__IO", "uint32_t", "*", ")", "CSR_BRE_BB", "=", "(", "uint32_t", ")", "NewState", ";", "}'" ]
PWR_BackupRegulatorCmd
rene-dev/stmbl
multi_line
train
1,090
1,359
[ "Enables", "or", "disables", "the", "OverDrive" ]
[ "'void", "PWR_OverDriveCmd", "(", "FunctionalState", "NewState", ")", "{", "/*", "Check", "the", "parameters", "*/", "assert_param", "(", "IS_FUNCTIONAL_STATE", "(", "NewState", ")", ")", ";", "/*", "Set/Reset", "the", "ODEN", "bit", "to", "enable/disable", "the", "Over", "Drive", "mode", "*/", "*", "(", "__IO", "uint32_t", "*", ")", "CR_ODEN_BB", "=", "(", "uint32_t", ")", "NewState", ";", "}'" ]
PWR_OverDriveCmd
rene-dev/stmbl
multi_line
train
1,091
1,360
[ "Enables", "or", "disables", "access", "to", "the", "backup", "domain", "(RTC", "registers,", "RTC" ]
[ "'void", "PWR_BackupAccessCmd", "(", "FunctionalState", "NewState", ")", "{", "/*", "Check", "the", "parameters", "*/", "assert_param", "(", "IS_FUNCTIONAL_STATE", "(", "NewState", ")", ")", ";", "*", "(", "__IO", "uint32_t", "*", ")", "CR_DBP_BB", "=", "(", "uint32_t", ")", "NewState", ";", "}'" ]
PWR_BackupAccessCmd
rene-dev/stmbl
multi_line
train
1,092
1,361
[ "Enables", "or", "disables", "the", "WakeUp", "Pin", "functionality" ]
[ "'void", "PWR_WakeUpPinCmd", "(", "uint32_t", "PWR_WakeUpPinx", ",", "FunctionalState", "NewState", ")", "{", "/*", "Check", "the", "parameters", "*/", "assert_param", "(", "IS_FUNCTIONAL_STATE", "(", "NewState", ")", ")", ";", "assert_param", "(", "IS_PWR_WAKEUP_PIN", "(", "NewState", ")", ")", ";", "if", "(", "PWR_WakeUpPinx", "==", "PWR_WakeUp_Pin1", ")", "/*", "PWR_WakeUp_Pin1", "*/", "{", "*", "(", "__IO", "uint32_t", "*", ")", "CSR_EWUP1_BB", "=", "(", "uint32_t", ")", "NewState", ";", "}", "#", "if", "defined", "(", "STM32F410xx", ")", "<if", "type=\"elseif\">", "else", "if", "(", "PWR_WakeUpPinx", "==", "PWR_WakeUp_Pin3", ")", "/*", "PWR_WakeUp_Pin3", "*/", "{", "*", "(", "__IO", "uint32_t", "*", ")", "CSR_EWUP3_BB", "=", "(", "uint32_t", ")", "NewState", ";", "}", "#", "endif", "/*", "STM32F410xx", "*/", "else", "/*", "PWR_WakeUp_Pin2", "*/", "{", "*", "(", "__IO", "uint32_t", "*", ")", "CSR_EWUP2_BB", "=", "(", "uint32_t", ")", "NewState", ";", "}", "}'" ]
PWR_WakeUpPinCmd
rene-dev/stmbl
multi_line
train
1,093
1,362
[ "Enables", "or", "disables", "the", "OverDrive", "switching" ]
[ "'void", "PWR_OverDriveSWCmd", "(", "FunctionalState", "NewState", ")", "{", "/*", "Check", "the", "parameters", "*/", "assert_param", "(", "IS_FUNCTIONAL_STATE", "(", "NewState", ")", ")", ";", "/*", "Set/Reset", "the", "ODSWEN", "bit", "to", "enable/disable", "the", "Over", "Drive", "switching", "mode", "*/", "*", "(", "__IO", "uint32_t", "*", ")", "CR_ODSWEN_BB", "=", "(", "uint32_t", ")", "NewState", ";", "}'" ]
PWR_OverDriveSWCmd
rene-dev/stmbl
multi_line
train
1,094
1,363
[ "Enables", "or", "disables", "the", "UnderDrive", "mode" ]
[ "'void", "PWR_UnderDriveCmd", "(", "FunctionalState", "NewState", ")", "{", "/*", "Check", "the", "parameters", "*/", "assert_param", "(", "IS_FUNCTIONAL_STATE", "(", "NewState", ")", ")", ";", "if", "(", "NewState", "!=", "DISABLE", ")", "{", "/*", "Set", "the", "UDEN[1:0]", "bits", "to", "enable", "the", "Under", "Drive", "mode", "*/", "PWR", "->", "CR", "|=", "(", "uint32_t", ")", "PWR_CR_UDEN", ";", "}", "else", "{", "/*", "Reset", "the", "UDEN[1:0]", "bits", "to", "disable", "the", "Under", "Drive", "mode", "*/", "PWR", "->", "CR", "&=", "(", "uint32_t", ")", "(", "~", "PWR_CR_UDEN", ")", ";", "}", "}'" ]
PWR_UnderDriveCmd
rene-dev/stmbl
multi_line
train
1,095
1,364
[ "Look", "up", "a", "register", "by", "its", "GDB", "internal", "register", "number" ]
[ "'static", "struct", "tdesc_arch_reg", "*", "tdesc_find_arch_register", "(", "struct", "gdbarch", "*", "gdbarch", ",", "int", "regno", ")", "{", "struct", "tdesc_arch_data", "*", "data", ";", "data", "=", "gdbarch_data", "(", "gdbarch", ",", "tdesc_data", ")", ";", "if", "(", "regno", "<", "VEC_length", "(", "tdesc_arch_reg", ",", "data", "->", "arch_regs", ")", ")", "return", "VEC_index", "(", "tdesc_arch_reg", ",", "data", "->", "arch_regs", ",", "regno", ")", ";", "else", "return", "NULL", ";", "}'" ]
tdesc_find_arch_register
SuperHouse/esp-open-rtos
single_line
train
1,096
1,365
[ "Update", "GDBARCH", "to", "use", "the", "target", "description", "for", "registers" ]
[ "'void", "tdesc_use_registers", "(", "struct", "gdbarch", "*", "gdbarch", ",", "const", "struct", "target_desc", "*", "target_desc", ",", "struct", "tdesc_arch_data", "*", "early_data", ")", "{", "int", "num_regs", "=", "gdbarch_num_regs", "(", "gdbarch", ")", ";", "int", "ixf", ",", "<type", "ref=\"prev\"/>", "ixr", ";", "struct", "tdesc_feature", "*", "feature", ";", "struct", "tdesc_reg", "*", "reg", ";", "struct", "tdesc_arch_data", "*", "data", ";", "struct", "tdesc_arch_reg", "*", "arch_reg", ",", "<type", "ref=\"prev\"/>", "new_arch_reg", "=", "{", "0", "}", ";", "htab_t", "reg_hash", ";", "/*", "We", "can\\'t", "use", "the", "description", "for", "registers", "if", "it", "doesn\\'t", "describe", "any.", "This", "function", "should", "only", "be", "called", "after", "validating", "registers,", "so", "the", "caller", "should", "know", "that", "registers", "are", "included.", "*/", "gdb_assert", "(", "tdesc_has_registers", "(", "target_desc", ")", ")", ";", "data", "=", "gdbarch_data", "(", "gdbarch", ",", "tdesc_data", ")", ";", "data", "->", "arch_regs", "=", "early_data", "->", "arch_regs", ";", "xfree", "(", "early_data", ")", ";", "/*", "Build", "up", "a", "set", "of", "all", "registers,", "so", "that", "we", "can", "assign", "register", "numbers", "where", "needed.", "The", "hash", "table", "expands", "as", "necessary,", "so", "the", "initial", "size", "is", "arbitrary.", "*/", "reg_hash", "=", "htab_create", "(", "37", ",", "htab_hash_pointer", ",", "htab_eq_pointer", ",", "NULL", ")", ";", "for", "(", "ixf", "=", "0", ";", "VEC_iterate", "(", "tdesc_feature_p", ",", "target_desc", "->", "features", ",", "ixf", ",", "feature", ")", ";", "ixf", "++", ")", "for", "(", "ixr", "=", "0", ";", "VEC_iterate", "(", "tdesc_reg_p", ",", "feature", "->", "registers", ",", "ixr", ",", "reg", ")", ";", "ixr", "++", ")", "{", "void", "*", "*", "slot", "=", "htab_find_slot", "(", "reg_hash", ",", "reg", ",", "INSERT", ")", ";", "*", "slot", "=", "reg", ";", "}", "/*", "Remove", "any", "registers", "which", "were", "assigned", "numbers", "by", "the", "architecture.", "*/", "for", "(", "ixr", "=", "0", ";", "VEC_iterate", "(", "tdesc_arch_reg", ",", "data", "->", "arch_regs", ",", "ixr", ",", "arch_reg", ")", ";", "ixr", "++", ")", "if", "(", "arch_reg", "->", "reg", ")", "htab_remove_elt", "(", "reg_hash", ",", "arch_reg", "->", "reg", ")", ";", "/*", "Assign", "numbers", "to", "the", "remaining", "registers", "and", "add", "them", "to", "the", "list", "of", "registers.", "The", "new", "numbers", "are", "always", "above", "gdbarch_num_regs.", "Iterate", "over", "the", "features,", "not", "the", "hash", "table,", "so", "that", "the", "order", "matches", "that", "in", "the", "target", "description.", "*/", "gdb_assert", "(", "VEC_length", "(", "tdesc_arch_reg", ",", "data", "->", "arch_regs", ")", "<=", "num_regs", ")", ";", "while", "(", "VEC_length", "(", "tdesc_arch_reg", ",", "data", "->", "arch_regs", ")", "<", "num_regs", ")", "VEC_safe_push", "(", "tdesc_arch_reg", ",", "data", "->", "arch_regs", ",", "&", "new_arch_reg", ")", ";", "for", "(", "ixf", "=", "0", ";", "VEC_iterate", "(", "tdesc_feature_p", ",", "target_desc", "->", "features", ",", "ixf", ",", "feature", ")", ";", "ixf", "++", ")", "for", "(", "ixr", "=", "0", ";", "VEC_iterate", "(", "tdesc_reg_p", ",", "feature", "->", "registers", ",", "ixr", ",", "reg", ")", ";", "ixr", "++", ")", "if", "(", "htab_find", "(", "reg_hash", ",", "reg", ")", "!=", "NULL", ")", "{", "new_arch_reg", ".", "reg", "=", "reg", ";", "VEC_safe_push", "(", "tdesc_arch_reg", ",", "data", "->", "arch_regs", ",", "&", "new_arch_reg", ")", ";", "num_regs", "++", ";", "}", "htab_delete", "(", "reg_hash", ")", ";", "/*", "Update", "the", "architecture.", "*/", "set_gdbarch_num_regs", "(", "gdbarch", ",", "num_regs", ")", ";", "set_gdbarch_register_name", "(", "gdbarch", ",", "tdesc_register_name", ")", ";", "set_gdbarch_register_type", "(", "gdbarch", ",", "tdesc_register_type", ")", ";", "set_gdbarch_remote_register_number", "(", "gdbarch", ",", "tdesc_remote_register_number", ")", ";", "set_gdbarch_register_reggroup_p", "(", "gdbarch", ",", "tdesc_register_reggroup_p", ")", ";", "}'" ]
tdesc_use_registers
SuperHouse/esp-open-rtos
single_line
train
1,097
1,366
[ "Search", "FEATURE", "for", "a", "register", "named", "NAME" ]
[ "\"int", "tdesc_numbered_register", "(", "const", "struct", "tdesc_feature", "*", "feature", ",", "struct", "tdesc_arch_data", "*", "data", ",", "int", "regno", ",", "const", "char", "*", "name", ")", "{", "struct", "tdesc_arch_reg", "arch_reg", "=", "{", "0", "}", ";", "struct", "tdesc_reg", "*", "reg", "=", "tdesc_find_register_early", "(", "feature", ",", "name", ")", ";", "if", "(", "reg", "==", "NULL", ")", "return", "0", ";", "/*", "Make", "sure", "the", "vector", "includes", "a", "REGNO'th", "element.", "*/", "while", "(", "regno", ">=", "VEC_length", "(", "tdesc_arch_reg", ",", "data", "->", "arch_regs", ")", ")", "VEC_safe_push", "(", "tdesc_arch_reg", ",", "data", "->", "arch_regs", ",", "&", "arch_reg", ")", ";", "arch_reg", ".", "reg", "=", "reg", ";", "VEC_replace", "(", "tdesc_arch_reg", ",", "data", "->", "arch_regs", ",", "regno", ",", "&", "arch_reg", ")", ";", "return", "1", ";", "}\"" ]
tdesc_numbered_register
SuperHouse/esp-open-rtos
single_line
train
1,098
1,367
[ "Return", "1", "if", "this", "target", "description", "includes", "any", "registers" ]
[ "'int", "tdesc_has_registers", "(", "const", "struct", "target_desc", "*", "target_desc", ")", "{", "int", "ix", ";", "struct", "tdesc_feature", "*", "feature", ";", "if", "(", "target_desc", "==", "NULL", ")", "return", "0", ";", "for", "(", "ix", "=", "0", ";", "VEC_iterate", "(", "tdesc_feature_p", ",", "target_desc", "->", "features", ",", "ix", ",", "feature", ")", ";", "ix", "++", ")", "if", "(", "!", "VEC_empty", "(", "tdesc_reg_p", ",", "feature", "->", "registers", ")", ")", "return", "1", ";", "return", "0", ";", "}'" ]
tdesc_has_registers
SuperHouse/esp-open-rtos
single_line
train
1,099