| 121 | } |
| 122 | |
| 123 | int main(int argc, char* argv[]) { |
| 124 | acl::log::stdout_open(true); |
| 125 | |
| 126 | int nblock = 2, capacity = 1000, incr = 999; |
| 127 | int n, max = 100000, pos = 987; |
| 128 | while ((n = getopt(argc, argv, "hn:p:b:c:i:")) > 0) { |
| 129 | switch (n) { |
| 130 | case 'h': |
| 131 | usage(argv[0]); |
| 132 | return 0; |
| 133 | case 'n': |
| 134 | max = atoi(optarg); |
| 135 | break; |
| 136 | case 'p': |
| 137 | pos = atoi(optarg); |
| 138 | break; |
| 139 | case 'c': |
| 140 | capacity = atoi(optarg); |
| 141 | break; |
| 142 | case 'i': |
| 143 | incr = atoi(optarg); |
| 144 | break; |
| 145 | case 'b': |
| 146 | nblock = atoi(optarg); |
| 147 | break; |
| 148 | default: |
| 149 | break; |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | test1(nblock, capacity, incr, max, pos); |
| 154 | |
| 155 | printf("\r\n"); |
| 156 | printf("=======================================================\r\n"); |
| 157 | test2(); |
| 158 | |
| 159 | return 0; |
| 160 | } |