non-matching: scheduling
| 83 | |
| 84 | // non-matching: scheduling |
| 85 | S32 xSerial::Write(char* data, S32 elesize, S32 n) |
| 86 | { |
| 87 | S32 nbit; |
| 88 | |
| 89 | if (n == 0) |
| 90 | { |
| 91 | nbit = 0; |
| 92 | } |
| 93 | else |
| 94 | { |
| 95 | nbit = n > 0 ? n * elesize * 8 : -n; |
| 96 | |
| 97 | if (n < 0) |
| 98 | { |
| 99 | S32 bidx = 0; |
| 100 | for (S32 i = 0; i < nbit; i++) |
| 101 | { |
| 102 | S32* iptr = (S32*)data; |
| 103 | wrbit(*iptr & g_tbl_onbit[bidx]); |
| 104 | if (++bidx == 32) |
| 105 | { |
| 106 | bidx = 0; |
| 107 | data = (char*)((U32*)data + 1); |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | else |
| 112 | { |
| 113 | S32 bidx = 0; |
| 114 | for (S32 i = 0; i < nbit; i++) |
| 115 | { |
| 116 | char* cptr = data; |
| 117 | wrbit(*cptr & g_tbl_onbit[bidx]); |
| 118 | if (++bidx == 8) |
| 119 | { |
| 120 | bidx = 0; |
| 121 | data++; |
| 122 | } |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | return nbit; |
| 128 | } |
| 129 | |
| 130 | S32 xSerial::Write_b1(S32 bits) |
| 131 | { |
no test coverage detected